Community
Participate
Working Groups
Created attachment 99848 [details] patch Build ID: I20080429053810 Formatting tends to be impacted severely by many small changes (new lines and tabs). A single-lined, 1MB XML file can take an incredibly long time to format. XML tends to be one of the languages this can be most easily reproduced in, as auto-generated XML documents are common. I've attached a patch to start moving in the right direction with this. The patch includes creating an unrestricted document rewrite session for the context menu-driven formatting (sequential was creating a deprecated text store that performed slower than the Gap Text Store). Additionally, the presentation reconciler is aware of document rewrite sessions and will not apply style changes until the rewrite session is complete. Another place to begin looking is at the StructuredDocumentReParser, as some of the files I've formatted have to reparse the document 97k+ times when updating the model.
A good start, and a necessary step to avoid performance regressions with the new syntax coloring scheme vs. the old one by shutting off the presentation reconciler during format operations and making sure we use the faster text storage class at all times. Patch runs well with low risk, invoking the formatting repeatedly.
released
Verified in S-3.0RC4-20080610084135.