| Summary: | File being edited seems to be stored 8 times in memory | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Mark Christiaens <mark.g.j.christiaens> | ||||||
| Component: | Xtext Backlog | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||||
| Status: | NEW --- | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | chanskw, eclipse, mark.g.j.christiaens, sebastian.zarnekow, sven.efftinge | ||||||
| Version: | 2.0.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Mark Christiaens
Created attachment 185545 [details]
Dump of profiling results
Note that I did remove part of the string representing the file content. If not, this HTML would have been over a MB.
Created attachment 185546 [details]
Dump of profiling results
I am seeing the same thing with XText 1.0.2 There is not much that can be done about this one with reasonable effort. A freshly opened editor causes the complete string to be hold 3 times in memory. There is the dirty state manager, that refers to the content of the resource, the resource's parse result and the last document event that the text viewer refers to. A second editor with another resource that has a cross link to the first one, will cause the first one to be copied one more time. The document itself will hold references to a number of substrings for each line of the input. I could implement something (modifying existing APIs) which would save exactly one of the copies of the entire input. If the fact that the string is stored 4 times is not a show stopper on your side, I'm inclined to postpone this ticket. Please let me know if that is no option for your use case. I think that the duplicate files are not yet a show stopper. Removing 1 of X duplicates is probably not useful anyway so I'm fine with postponing. |