Quote:
Originally Posted by HarryT
Are you suggesting that, if you wanted to jump to a point 9.9MB into a 10MB file, you'd need to "stream" all the preceding 9.9MB of the file in order to get the state data for the point you're jumping to? That sounds horribly time consuming. I think that's the whole point of parsing the file once and then storing the parse tree in memory, isn't it?
|
You just need segments of the parse tree in memory to apply the required styles. So you can overead large parts of the 9.9 MB. But yes, for more distant positions in a big file you would have to read/inspect large parts of the file (again). That's what some mobile browsers are doing. Look, mobile device these days have powerful CPUs and very fast I/O. It's just the way it works. You can't hold the complete parse tree in memory on all devices.