Comments (4)
Hm, my understanding is that re-flows are going to be caused anyway by getBoundingClientRect()
. I also tried hard-coding the window.innerHeight
, and I'm not seeing any difference in the timeline or when I tick "Enable paint flashing" (it still flashes on the debounce either way).
But @paullewis would know better than me! I'd be curious to know if it makes a difference. (For the record, here's the function we're talking about.)
from pokedex.org.
Hm yes, I completely missed that getBoundingClientRect()
- it's possible there is no improvement by changing it.
from pokedex.org.
For FLIP the first getBoundingClientRec()
call should be done before any style mutations so we can reuse the previous frame's layout values. Then we apply the style change to move everything to the Last position (invalidating layout). Then we call getBoundingClientRect()
again, which will trigger layout.
So there's typically no benefit to caching values if FLIP is done correctly. The balancing act is in the forced styles & layout work, and whether that's cheap enough to do inside of 100ms, and thereby retain the impression of immediacy to the user.
from pokedex.org.
Thanks for that @paullewis :) will close this
from pokedex.org.
Related Issues (20)
- Evee has undefined in evolution
- Trying to update but there's a number of missing resources HOT 3
- Panel animation blip when mouse plugged in
- Interesting error stack in UC browser when going into detail view HOT 4
- UC Browser compat HOT 3
- Store images using Cache API HOT 1
- Description for Mew showing as Mewtwo HOT 3
- Visual irregularity in back button on Chrome dev HOT 1
- monsters-search-bar is missing a label HOT 1
- Add gen 7 HOT 2
- Find (Ctrl+F) is broken HOT 2
- More Pokemon please!
- Scroll position is reset when opening pokemon details
- How could you open in new window on desktop version?
- Android HOT 1
- Updating build scripts HOT 3
- No Generation 6 And 7 Pokemon info
- Ghost/Dark types have wrong weaknesses
- Catch rate of all pokemons is 0
- Add Maskable icons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokedex.org.