Giter VIP home page Giter VIP logo

Comments (6)

callmecavs avatar callmecavs commented on May 25, 2024

would you mind digging into this a bit further for me? I think the spike may be caused by requestAnimationFrame being called 60 times per second, to achieve a 60fps scroll. The scroll completing would explain the "cliff". In that case, I wouldn't think it's a memory leak. I know the Chrome dev tools allow you to dig into the JS stack and see what function(s) are being called, perhaps your tools provide a similar feature?

will leave this open until I hear back, thank you

from jump.js.

AaronLayton avatar AaronLayton commented on May 25, 2024

It could be as you say - I just went to your test site... hit record, pressed the go down button, pressed to go up button.

I havn't had chance to dig into it yet though, could it be creating variables every time rAF calls?

from jump.js.

callmecavs avatar callmecavs commented on May 25, 2024

the _loop function is what runs within each requestAnimationFrame call. that code is highlighted here: https://github.com/callmecavs/jump.js/blob/master/src/jump.js#L18-L31

it's only referencing and working with existing class properties - all that is created is more requestAnimationFrames. therefore, I don't think this is related to creating variables. there is some math related to the easing function that happens in each loop, but I couldn't imagine those low level operations would cause this type of spike.

if you get a chance, i'd really appreciate you doing some more digging 🙌

from jump.js.

callmecavs avatar callmecavs commented on May 25, 2024

pasted image at 2015_11_30 11_22 am

did some profiling in the Chrome dev tools, and I'm not seeing anything out of the ordinary. going to close this for now, as I believe what you're seeing is related to the requestAnimationFrame calls. if in your futher testing you come across something in particular, I'll reopen it and take a peak. thanks again for your efforts

from jump.js.

callmecavs avatar callmecavs commented on May 25, 2024

here are some screenshots of the heap from the Chrome devtools as well:

pasted image at 2015_11_30 11_29 am

pasted image at 2015_11_30 11_30 am

seems as though everything from the lib is insignificantly small

from jump.js.

callmecavs avatar callmecavs commented on May 25, 2024

looping in @jaxgeller, as he helped with some of this profiling

from jump.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.