If YAT is not open, consider not to process DebugScreen.OnTimerTimeout stuff due to garbage generation
Serotonindude opened this issue · 3 comments
Hi,
just did some memory profiling of my app and found that YAT produces about 1MB garbage in 8 minutes even if it is not opened and debug screen (how to actually open it?) is not visible as well.
It happens due to the allocations in DebugScreen.OnTimerTimeout and deeper in the stack trace.
That's not really a lot of memory, but >20k objects. No problem as long as the feature is used. But shouldn't produce garbage if not visible.
Added a screenshot of the memory profile, it's almost all due to YAT. :)
Hey, thanks for reporting.
What program are you using? I assume some from JetBrains. I'll fix the error quickly since I know exactly what's causing it, but I'd be happy to take a closer look at the memory usage.
DebugScreen is available via the ds
command. For example, typing ds -i=all
will display whatever information is available, while ds -i=fps
will only display FPS. I will have to improve the syntax of the command, but overall it works fine, you can even extend it to display additional information.
You can find all available commands by typing list
, and you can find the documentation for them by typing man command_name
.
Yeah, it's JetBrains dotMemory... I'm currently using the 30-days trial :D
You can download it here: https://www.jetbrains.com/dotmemory/download/#section=portable
I wouldn't call it an error, more of a best practice... but yeah, it causes unneccesary memory pressure...
I didn't dig deep into YAT yet, but gotta try that... sound's like useful information :)
thanks
Okay, so I've already fixed the problem, which has significantly reduced memory usage.
I can still see room for improvement, but this is something I will have to think more about.
I'm closing the issue for now. A new version with this change will probably appear tomorrow.
Thanks for the dotMemory recommendation, it will definitely come in handy.