loktar00 / loktar00/JQuery-Snowfall
Change Positioning from top/left to transform
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 715
- Forks
- 218
- PR merge metrics
- No merged PRs in 30d
Description
It is much better for moving objects to use transform: translate(x, y) instead of absolute positioning with top & left, because changing the top and left attributes it needs Chrome to process 3 operations:
- It have to process the layout, because
top/leftmay affect other elements on the page - Damaged Pixels have to be repainted
- The Composition has changed so it has to calculate over this step too
A much better choice is to use the transform attribute instead, because this attribute doesn't affect other elements and so no pixels can be damaged and you only have to change your Composition.
It would be a great enhancement.
I saw pages using your Plugin and forced them to FPS under 30 and sometimes 20.
I hope I could help you!
For more information:
http://csstriggers.com/#top
http://csstriggers.com/#transform
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the code that updates snowflake positions, then compare its current top/left movement with the requested transform-based approach. Done means the positioning uses transforms and the plugin no longer causes the reported performance degradation; verify behavior on a page using the plugin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100