Open doktorjw opened 2 years ago
This looks like it may not really be an issue --- working on the document with the viewer up, I can spike really high memory utilization. Performing a GC and memory drops back down to what I would expect ~600MB for a low.
If memory usage is a problem, it shouldn't be too difficult to limit the number of requests for rendering new diagrams. Currently, the plugin reacts to all selection changes, which effectively means every cursor movement and computes a new "effective" diagram source. Then this diagram is rendered if the effective diagram source has changed, which typically will be the case when you're typing. We could wait a second before generating the full diagram, so fewer will be made.
Some kind of delay (configurable?) would probably be good, if it's trying to generate a new diagram on every cursor movement. I find it handy to have the diagram open live while I'm typing the plantUML to double check that what I'm expecting to see actually is what I am getting (I discovered this way that without "autoactivate" turned on, nested "Response" lines don't actually nest in the resulting diagram.
Any chance the zoom level could be remembered, as well as the position? :)
Using the PlantUML view (not the svg one) --- would be nice if the view remembered the current zoom level (like it does the current position). Whenever I make a change to a *.puml diagram, my position is remembered, but the zoom pops back out to the default level.
Also --- spent an entire day working on a PlantUML diagram, tracing my way through a system that is new to me. After hours of working on the diagram (I don't remember, but it was probably 8 or 9 hours), I popped an out-of-memory error. This surprised me, as I'm working on my big Linux box with 4 GB allocated to eclipse. I looked at the memory meter I keep at the bottom of Eclipse and sure enough, it was pegged at 4GB.
Currently, having been running for ~1/2 hour, and just a few minor edits, I can see I have bounced above the initial 2GB that I allocate, which is rare for my working in Eclipse.