Giter Club home page Giter Club logo

Comments (3)

atifaziz avatar atifaziz commented on June 13, 2024

Can you share more details? Like:

  • What's Template.txt like? What if it's 1GB in size then no surprises!
  • How do you know leaking memory? What tool did you use?
  • Can you share numbers or a picture of the memory leak?
  • What do you define as critical?
  • Did you measure the garbage collection frequency and heaps?
  • Did you try adding a periodic GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced)?

My hunch is that the leak (if any) is coming from the use of Roslyn's C# scripting, which I have heard (from @filipw) is not designed to be used for long-running processes; that is, garbage compiled templates do not get collected. I could be wrong and so it should be confirmed with the Roslyn team/project.

from t5.

endeffects avatar endeffects commented on June 13, 2024

Thanks for the fast reply. Well the Template is a simple Class with some Placeholders, nothing special. There is also no Scripting involved which generates additional Code.

For testing i‘ve used the vs 2017 Monitoring Tools and the Taskmanager.

For now i just wrote this simple Stress Tool to check the Performance.

from t5.

endeffects avatar endeffects commented on June 13, 2024

Btw, i saw a similar behavior in the past by using the Microsoft implementation. I was able to fix this by using a singleton for the Engine and by disposing the AppDomain within the SessionHost.

I also tried this with your Library, but the CompiledTemplate Class throws an IndexOutBounceException by re-using it within the loop. Also i‘m not able to dispose the AppDomain by Design.

from t5.

Related Issues (12)

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.