XMLFoldManager uses an implementation of DocumentModel. In other words, it uses XMLSyntaxParser and old editor APIs.
There are several issues with that and after discussions we have decided to remove that dependency and rewrite xml fold.
This will help solve several issues particularly some on performance.
Fix integrated: http://hg.netbeans.org/main/rev/26fbf1aa6d3a
The fold manager is completely re-written using lexer. It doesn't use the document model anymore.
*** Issue 127323 has been marked as a duplicate of this issue. ***