We have moved to GitHub Issues
Created by Shannon Deminick 10 May 2016, 11:14:48 Updated by Stephan 19 May 2016, 15:03:40
Relates to: U4-8476
This fixes the LoadContentFromDatabase method - before this was storing every single xml node in memory in dictionaries (x2) and then performing the re-organization of all nodes afterwords to construct a document, now we just read each row and organize the document accordingly,
This issue is also part of this PR: http://issues.umbraco.org/issue/U4-8461
The thing about reading the xml and building the document without using many dictionaries seems to make sense.
The thing about caching the cloned xml... worries me. When the SafeXmlReaderWriter is disposed, it assigns the cloned xml back to content._xml... so in a way the cloned xml becomes "publish" and should ''not'' be modified anymore. Whereas with what you are doing... any further change will impact that content._xml value which therefore is not immutable anymore. That is, it is now accessed by other requests.
So... if in, say, a controller, I publish three content items, the first one will cause a clone to be created and assigned to _xml ''and become visible by other requests and yet be modified when publishing the second item'' which (I think) is what the whole cloning was supposed to prevent?
Hrm ok, let's chat about this tomorrow - was hoping there was a way to prevent the re-cloning during a specific sequence of events since that will kill memory usage with a large cache. Not sure there's an easy way to do that though due to the way things work with the xml cache.
I've reverted that cloning part now, will create a diff issue for that.
Backwards Compatible: True
Due in version: 7.5.0
Sprint: Sprint 15