loktar00 / loktar00/JQuery-Snowfall

Change Positioning from top/left to transform

Open
#43 2 comments 0 reactions 0 assignees View on GitHub

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:

  1. It have to process the layout, because top/left may affect other elements on the page
  2. Damaged Pixels have to be repainted
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.