Git Product home page Git Product logo

Comments (11)

Seneral avatar Seneral commented on May 30, 2024

Thanks, just took a look and indeed, only when dragging around (or, as is my assumption, when calling OnGUI), I have some severe memory leaks of up to 50MB/second... I have to take a look, thanks very much for reporting this!

from node_editor_framework.

pmhpereira avatar pmhpereira commented on May 30, 2024

I'm trying to find the culprit and it seems to be related to DrawConnections().

from node_editor_framework.

pmhpereira avatar pmhpereira commented on May 30, 2024

Just a funny story to justify this finding: I noticed this when I was demoing my thesis to my supervisor (I use this project as a manager for specifying some rules to the creation/generation of obstacles in my platformer game) and after 5 minutes Windows crashed, straight to the log-in screen. :-)

from node_editor_framework.

Seneral avatar Seneral commented on May 30, 2024

Yes, you're right, seems to be it;) You're pretty fast, was about to download a leak tracker lol...
Anyway, then I'm assuming it's the drawing formula I'm using or how the textures are handled...

from node_editor_framework.

Seneral avatar Seneral commented on May 30, 2024

It is my drawing formula. Adding

UnityEditor.Handles.DrawBezier (startPos, endPos, startTan, endTan, col, tex, width);
return;

in the RTEditorGUI.DrawBezier function, before my implementation, fixes it. I'll examine this more closely and report asap:)

Likely problem:
Creating new Material every line segment drawing (wtf am I stupid)

from node_editor_framework.

pmhpereira avatar pmhpereira commented on May 30, 2024

Found it!

// NodeEditorGUI.cs:125
Material mat = new Material (Shader.Find ("Unlit/Transparent"));
mat.SetTexture ("_MainTex", tex);
mat.SetPass (0);

from node_editor_framework.

Seneral avatar Seneral commented on May 30, 2024

It is, problem fixed, thank you:)

Wow, really?! I hope that didn't ruin your thesis :( That would be absolutely desastrous:(

from node_editor_framework.

Seneral avatar Seneral commented on May 30, 2024

Don't understand though why the GC didn't clean up... Maybe to much garbage too fast.... lol

from node_editor_framework.

pmhpereira avatar pmhpereira commented on May 30, 2024

I was just showing the progress I made since the last meeting we had. It was cool to see Windows spasming and flashing my screen like crazy before exiting my user session. :D

Yeah, probably for being called so many times in a frame.
Are you fixing it, or want me to make a PR?

from node_editor_framework.

Seneral avatar Seneral commented on May 30, 2024

Already fixed, I was onto finishing the update anyway:)

from node_editor_framework.

pmhpereira avatar pmhpereira commented on May 30, 2024

Thanks for looking into this so quickly. ;-)
If you had taken more 15 min to answer, I would had fixed it myself. :P

from node_editor_framework.

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.