Particles.js: Lags on Firefox

Created on 17 Nov 2014  路  7Comments  路  Source: VincentGarreau/particles.js

Hello!
in chrome it works well, but ofcourse it lags in FireFox, very slow, and lags.

enhancement

Most helpful comment

This might not be solvable because Firefox has some serious issues with lineTo. It's 21x slower than chrome: http://jsperf.com/draw-lines

I tried making a minimal proof of concept drawing 300 lines (no animation, no alpha transparency) and the performance degrades quickly with canvas size, it's completely unusable on rMBP. Mozilla also seem to be aware lineTo is slow: https://bugzilla.mozilla.org/show_bug.cgi?id=1001954

My small demo page drawing 300 lines: http://jsfiddle.net/4ry8pdpb/1/, in my actual project it's closer to 600 lines that's rendered effortlessly by chrome.

All 7 comments

Hi!

Yes, unfortunately... I actually noticed for Firefox. I'll try to improve performance for the future releases ;)

Too bad, it crashed my session on Firefox.

Hi @VincentGarreau I'm willing to fix this issue if you can mentor me through this bug. Any idea why its lagging on Firefox or what sections of the code I should look into that might be causing these performance issues?

@VincentGarreau you could start here ;)

@VincentGarreau if 'distanceParticles' is commented out, then the lag goes away

This might not be solvable because Firefox has some serious issues with lineTo. It's 21x slower than chrome: http://jsperf.com/draw-lines

I tried making a minimal proof of concept drawing 300 lines (no animation, no alpha transparency) and the performance degrades quickly with canvas size, it's completely unusable on rMBP. Mozilla also seem to be aware lineTo is slow: https://bugzilla.mozilla.org/show_bug.cgi?id=1001954

My small demo page drawing 300 lines: http://jsfiddle.net/4ry8pdpb/1/, in my actual project it's closer to 600 lines that's rendered effortlessly by chrome.

Thanks for your detailed explanation @Celc! I noticed that Firefox has serious issues with lineTo, and your explanation enlightened me. I hope it will be fixed soon...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emilwibe picture emilwibe  路  4Comments

Necmttn picture Necmttn  路  6Comments

ghost picture ghost  路  8Comments

akashnimare picture akashnimare  路  7Comments

cosmokrust picture cosmokrust  路  5Comments