Comments (3)
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.
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.
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)
- Template using VB fails with compilation errors HOT 1
- Publish as a .NET Core (2.1) Global Tool HOT 5
- compilation err HOT 1
- Generation error if parameter directive is used HOT 6
- Does this support VS 2017 IntelliSense or syntax highlighting? HOT 1
- Tools HOT 1
- Tools HOT 1
- Tools HOT 1
- Tools HOT 1
- Tools HOT 1
- Having trouble with syntax HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t5.