rbfang / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

XML Parsing is excruciatingly slow #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When processing an XML response of ~2.3 MB it takes > 10 minutes to parse the 
response.  Also the format of the output is difficult to search.  The new 
version treats every element as a collapsible section with the start tag on one 
line, the contents on the next line and the closing tag on the next line.

Neither of these were issues with the old app.

Original issue reported on code.google.com by sconkwo...@gmail.com on 13 Nov 2012 at 9:14

GoogleCodeExporter commented 9 years ago
Currently whole parsing (either XML or JSON) is moved to background workers so 
it should go fast. However, I think think that when you collapse one element it 
collapses all collapsible elements inside which may causes delays. I'll check 
this.  

Original comment by jarro...@gmail.com on 13 Nov 2012 at 9:24

GoogleCodeExporter commented 9 years ago
Perhaps I am misunderstanding what you are saying, but when the XML is 
eventually displayed, all nodes are expanded.  On a side note, I can switch to 
raw output and see it instantly, but having collapsible nodes is very nice.

To clarify the formatting thing, I much preferred the way it used to work where 
only nested sections were collapsible.  Having the leaf nodes expandable and 
collapsible kinda just gets in the way.

For my own curiosity, what XML parser are you using?

Thanks for looking into this.

Original comment by sconkwo...@gmail.com on 13 Nov 2012 at 11:55

GoogleCodeExporter commented 9 years ago
OK, I think I got it and I think you right.
I use XML for js library 
(http://xmljs.sourceforge.net/website/documentation-w3cdom.html) to parse XML 
string and then own highlight parser.
It is that way because XML parsing and highlighting is moved to background 
thread (Web Worker) and there is not such property a "document" which I can use 
to use code highlighter. So I need to use additional parser for XML files.

Original comment by jarro...@gmail.com on 14 Nov 2012 at 5:54

GoogleCodeExporter commented 9 years ago

Original comment by jarro...@gmail.com on 23 Nov 2012 at 10:38