GithubHelp home page GithubHelp logo

Comments (5)

lojjic avatar lojjic commented on May 31, 2024

Thanks, it seems likely you're correct about disposal.

How are you measuring the memory consumption? Is this JS heap memory or GPU memory, or both?

from troika.

lojjic avatar lojjic commented on May 31, 2024

Not to ignore the issue, but in your specific case couldn't you just temporarily change the color to black rather than replacing the whole material?

from troika.

TimJJTing avatar TimJJTing commented on May 31, 2024

Thanks, it seems likely you're correct about disposal.

How are you measuring the memory consumption? Is this JS heap memory or GPU memory, or both?

I measure JS allocated memory with the stats component. See the top left corner in the codesandbox, the memory consumption keeps rising. Not yet sure about GPU memory though.

Not to ignore the issue, but in your specific case couldn't you just temporarily change the color to black rather than replacing the whole material?

Yes, I think this will fix my problem.

from troika.

BenLune avatar BenLune commented on May 31, 2024

Hi,
First of all, thanks and congrats for this great lib to render text with ThreeJS!

I also have a memory leak trouble with troika-three-text. Using Memory tab on Chrome Dev Tools, I can see the memory consumption increasing more and more when I display troika-three-text Text Component. If I don't add them to the scene, my memory consumption is stable.

I used a MatCapMaterial initially, I thought it could be due to that, then I decided to use a simple color instead, but I don't see any difference.

But I noticed that if I add the text on the scene without calling sync() function, it's ok, but I don't see anything. If I call sync() then I have memory issues.

The texts are created once only. I have 8 texts on the scene.

I'm on "three": 0.164.1 and "troika-three-text": 0.49.1

from troika.

BenLune avatar BenLune commented on May 31, 2024

I use an EffectComposer to render the scene, with a ReflectorForSSRPass. If I deactivate them, I don't have memory leaks anymore...

from troika.

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.