Skallwar / suckit

Suck the InTernet
Apache License 2.0
735 stars 38 forks source link

Stops freezing Firefoxes looking into the repo #139

Closed pinkforest closed 3 years ago

pinkforest commented 3 years ago

And crate.rs page so probably best to put into release.

pinkforest commented 3 years ago

@Skallwar Fixes #136

Also I took the liberty moving the logo image to media/ too

Skallwar commented 3 years ago

Is it possible to add a bit more height to the image? I like the 150col/20row (maybe 25) better but the height need to be bigger

pinkforest commented 3 years ago

We have to take some columns out to make it scale right. I'll try regular expression on the front bit.

pinkforest commented 3 years ago

@CohenArthur

https://github.com/pinkforest/svg-testing-bloat

Please note that it has to work in all kinds of different devices/view ports and intermittent CPU usage may be a problem too.

Every time that fast scroller is running it takes a bit CPU given amount of frames, pixels/scale etc.

Not sure we want to have some "loopy" CPU intensive "marketing" in README.md like that as scrolling creates a lot of frames.

Now you might skip/interpolate more frames but is that wise? :dagger: we'll try below.

But at least Firefox doesn't freeze anymore.. :wine_glass: so that is solved.

EDIT: Too tired going to :zzz:

pinkforest commented 3 years ago

@CohenArthur @Skallwar

You see frame skipping has an effect.. svg interpolates the frames

100ms not too bad but beyond that this is what 40 rows looks with 120 columns when output trimmed narrower

No frame skipping - 124KB https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-adjusted-120cols-40rows.svg

100ms minimum - 40KB (~best gain vs benefit) https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-adjusted-120cols-40rows-100ms.svg

420ms minimum - 24KB: https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-adjusted-120cols-40rows-420ms.svg

640 minimum - 20KB: https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-adjusted-120cols-40rows-640ms.svg

1200 minimum - 16KB: https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-adjusted-120cols-40rows-1200ms.svg

Ideally I would love to render with different minimum timings between prompt and output but maybe later..

pinkforest commented 3 years ago

@CohenArthur @Skallwar

And this is more close to original but takes 3-5 times more CPU with 120 minimum frame time upon scrolling in loop.

https://raw.githubusercontent.com/pinkforest/svg-testing-bloat/main/suckit-150cols-60rows-120ms.svg

You can find it in README.md along some others: https://github.com/pinkforest/svg-testing-bloat/blob/main/README.md

But still at least firefox is not freezing loading it :P

If we insist on using this scroller SVG I think the 120cols 40rows with 100ms one balances the CPU use :octopus:

Whilst this 150 cols with 60rows 120ms hogs a lot of CPU in exchange for "looking cool" marketing.

(I clearly need to create benchmarks with proper CPU metrics for these SVGs lol!)

Skallwar commented 3 years ago

If we insist on using this scroller SVG I think the 120cols 40rows with 100ms one balances the CPU use

Go for this one then

pinkforest commented 3 years ago

Go for this one then

changed :tada:

Now :zzz: what a rabbithole :rabbit: this was!