Re: [webkit-dev] DOM Serialization?
On Fri, Jan 22, 2010 at 7:16 AM, Christopher White skullkn...@gmail.com wrote: Is it possible to save the DOM resulting from the parsing of HTML / CSS into a file and then read it back instead of re-parsing the HTML (similar to Java object serialization). Does it save any time or is it a wash? This is going back a couple weeks, but I was curious as to what use cases you had in mind for this. For example, you could imagine this being done on the server side before sending to some kind of client. But that's probably not what you had in mind. And there is also the web archive use case that Darin mentioned. --Chris ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
Thank you for your feedback. Assuming it is not practical, any thoughts on things that can be done to speed up the parsing and loading process for content that is not dynamically generated by JavaScript (i.e. document.write())? On Sat, Jan 23, 2010 at 10:14 AM, Darin Adler da...@apple.com wrote: On Jan 23, 2010, at 8:18 AM, Christopher White wrote: What are the general thoughts whether a binary serialization is possible retaining all needed information for rendering? My general thought is that it is not practical. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
What are the general thoughts whether a binary serialization is possible retaining all needed information for rendering? On Fri, Jan 22, 2010 at 9:19 AM, Darin Adler da...@apple.com wrote: On Jan 22, 2010, at 9:12 AM, Adam Treat wrote: Correct me if I'm wrong, but he said without re-parsing. The WebArchive definitely needs to be reparsed, right? You’re right. I was wrong. I guess the idea boils down to inventing a new serialization for HTML besides HTML and XHTML, a binary one that would be more efficient in some way. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
On Jan 23, 2010, at 8:18 AM, Christopher White wrote: What are the general thoughts whether a binary serialization is possible retaining all needed information for rendering? My general thought is that it is not practical. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
On Jan 22, 2010, at 7:16 AM, Christopher White wrote: Is it possible to save the DOM resulting from the parsing of HTML / CSS into a file and then read it back instead of re-parsing the HTML (similar to Java object serialization). WebKit has a feature called web archives that does something like this. Does it save any time or is it a wash? Save time when doing what? I know there is a dump render tree function but does it save everything you need so that you can re-render the HTML page w/o the original HTML / CSS files? The render tree dumping is unrelated to this. The render tree is an internal data structure, and it’s useful to dump it for regression testing, but it has nothing to do with serialization or re-rendering a page. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
On Friday 22 January 2010 12:09:14 pm Darin Adler wrote: On Jan 22, 2010, at 7:16 AM, Christopher White wrote: Is it possible to save the DOM resulting from the parsing of HTML / CSS into a file and then read it back instead of re-parsing the HTML (similar to Java object serialization). WebKit has a feature called web archives that does something like this. Correct me if I'm wrong, but he said without re-parsing. The WebArchive definitely needs to be reparsed, right? Christopher White: I don't think what you are asking for exists. ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
On Jan 22, 2010, at 9:12 AM, Adam Treat wrote: Correct me if I'm wrong, but he said without re-parsing. The WebArchive definitely needs to be reparsed, right? You’re right. I was wrong. I guess the idea boils down to inventing a new serialization for HTML besides HTML and XHTML, a binary one that would be more efficient in some way. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] DOM Serialization?
Yes. What I am looking into is creating a binary version of the document (i.e. DOM including all rendering information). That way, when viewing the content, I can skip the parse step and just put the DOM into memory and start the layout. Time wash question? So I am trying to save time loading the doc. So my question is if there is a way to create a binary representation of the DOM with all the needed info (content and rendering), will the time saved skipping the parse step be substantial (if any at all) over reading a file which has a binary representation of the DOM, resurrecting the in-memory DOM and starting the layout process. Thanks! Chris On Fri, Jan 22, 2010 at 9:19 AM, Darin Adler da...@apple.com wrote: On Jan 22, 2010, at 9:12 AM, Adam Treat wrote: Correct me if I'm wrong, but he said without re-parsing. The WebArchive definitely needs to be reparsed, right? You’re right. I was wrong. I guess the idea boils down to inventing a new serialization for HTML besides HTML and XHTML, a binary one that would be more efficient in some way. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev