On 7/11/07, Ted Gould <ted@...11...> wrote:
What would everyone think about changing the XML parser to run queued GTK events ever 100 or so nodes? It would make loading SVG files slightly slower (most of the time there'd be no events) but it might make the application appear more responsive (when loading in general also, not just for scripted effects). Thoughts?
That's very dangerous IMHO. Running GTK events means running UI events, and that might involve any kind of change in the document. I don't think changing the content of a document while it's not yet fully loaded is a good idea. I did something similar for interruptible display - but there, a non-document-changing operation (rendering) is interrupted by a potentially document-changing operation, and if it indeed changed the document, the rendering simply aborts and starts anew. Even that revealed a ton of bugs and crashes that had to be fixed (including a crash in GTK itself). With your proposal, we'll have one document-changing operation (loading) interrupted by another document-changing operation - and I don't think it's possible to properly sort this out at all.