2009/2/28 Luigi PAnzeri <[email protected]>:
>
>>> Can you explain where the performance problems are in your approach?
>
> At the current state, the problem are the followings:
>
> Safarà Commands, the user can invoke (e.g. uppercase words, insert char,
> paste, browse methods, etc.), act on meaningful pieces (ranges) of texts
> (words, characters, regions, smalltalk parsed expressions, etc.). At every
> command invokation, parsers rebuild the range database.
> That is fine and done right, except that in some cases I could use better
> algorithm (as Lukas said, first make it work, then make it fast) as a lot of
> simple commands has often only a local effect on the text range database,
> then not a full rebuild is really needed.
>
> Text is presented with different visual properties (foreground colors,
> underline, right font, etc.), depending on its meaning (syntax highlighting,
> and more). At a first stage Safarà drew character x character, but it was
> too slow.
>
> The problem is that the meaning of the text is stored into ranges that are
> overlapping, instead I need runs (non overlapping ranges of text) in order
> to present the text. So I have to implement an algorithm that rebuild and
> perhaps cache better the run database. I have never really completed to do
> that, as I stopped to work on it. The work at squeaksource about runs was
> coded in a sprint made at the last ESUG)
>
> Second problem: perhaps it is a bad idea to parse the whole content of the
> buffer at each command invokation, i.e. user input.
> Parsing/SyntaxHighLighting stuff should be processed in background.
>
A better would be to use a tokenized view on edit buffer, where each
token has its range.
When user edits a text, first you detect which token is affected, then
rescan it, and rescan next tokens until you find that rest of text is
matching previously parsed tokens.

>>> And how do you define "too slow"?
>
> Too slow to convince me to use it to code Safarà itself.
>
> It hangs your pc for few seconds on long texts (> 10 lines) on each
> insertion.
>
> All this feedbacks/rumors about Safarà is really motivating for me. I hope
> to go back working on it to make it usable. I am quite confident that I can
> do it and I d like to do that before the summer.
>
> Luigi Panzeri
> --
> View this message in context: 
> http://n2.nabble.com/Aaah%2C-the-pain-or-ParagraphEditor-refactoring---%29-tp2375938p2400091.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to