RePod / psdle

Improving everyone's favorite online download list, one loop at a time.
https://repod.github.io/psdle
MIT License
193 stars 14 forks source link

Save Chrome #66

Closed RePod closed 3 years ago

RePod commented 5 years ago

Testing version: psdle.includes.js

Vendor code in Valkyrie likes to get around and PSDLE can't do much about it so changes must come from PSDLE's side. The problem has been narrowed down to repod.psdle.table.icons.select() and its $(document).off().on("scroll") binding, which passes through vendor code and somehow becomes a huge bottleneck in the profiler.

Firefox is unaffected, but will probably benefit from the improvements anyway. Personal testing was done on a Ryzen 1600 with lists of 10k, 30k, and 200k items on Chrome Canary.

Keep in mind this does not affect list spawn time (from clicking Start to seeing the list) only performance problems from the scrolling event after the list is generated. Here's a reference GIF for 200k performance. Hover and icon loading performance might be impacted by Chrome using 6GB of RAM but they do eventually load in BREAKING NEWS: Vendor code also gets its hands all up in mouse events so even CSS :hovers aren't safe from tanking performance. That may be looked into separately.

Spawning N amount of list items with the inject cache:

for (i=0;i<10000;i++) repod.psdle.debug.injectEntitlement([{"active_date":"2019-04-20T16:20:00Z","entitlement_attributes":[{"entitlement_key_flag":true,"package_file_size":1318060032,"placeholder_flag":false,"platform_id":"ps4","reference_package_url":""}],"entitlement_sub_type":0,"entitlement_type":5,"feature_type":1,"game_meta":{"icon_url":"","name":"Apex Construct Demo","package_type":"PS4GD","type":"PS4GD"},"id":"UP3046-CUSA12475_00-0000000000000000","is_consumable":false,"meta_revision":1535949987552,"product_id":"UP3046-CUSA12475_00-0000000000000000","revision_id":1532363097201,"reward_meta":{"reward_service_type":0},"sku_id":"UP3046-CUSA12475_00-0000000000000000-U099","subs_flag":false,"use_count":0,"use_limit":0}])

Notable changes:

This PR is not indicative of the final result and may change considerably before merge. Flexbox is intended to be properly implemented