XML Key/Value Cache Optimizations
For a read-only XML file server with a simple path-based addressing scheme, I initially used ConcurrentDictionary<string, XElement> as a key/value cache. This generated and kept constantly in memory a lot of unnecessary XAttribute and XElement instances which contributed nothing to raw data transfers across the wire. Considering the fact that resident XAttribute or XElement instances in the file server process were totally useless because we do indexing and serve result paths via our query server, I switched to using path-indexed string buffers with path-to-segment dictionaries as the new key/value cache. Memory footprint for hundred documents, before/after See and download the full gallery on posterous My question on Stackoverflow.com with some code http://stackoverflow.com/questions/3613713/how-to-get-stream-positions-of-xml-elements-in-net Full working environment screenshots ^__^ See and download the full gallery on posterous Posted via email from CORS...