[racket-dev] Large preferences file and performance

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Dec 3 17:32:45 EST 2010

On Friday, December 3, 2010, Neil Toronto <neil.toronto at gmail.com> wrote:
> Eli Barzilay wrote:
>
> 20 minutes ago, Casey Klein wrote:
>
> I just pushed a fix for a bug that made DrRacket extremely sluggish
> on my laptop. Most everything was slow, but typing in the find and
> replace fields was particularly bad -- each character would take
> about a second to appear on screen.
>
> The problem turned out to be that my framework preferences file was
> enormous, a problem since DrRacket saves your preferences very
> frequently. In particular, it saved them on each keystroke in the
> find and replace fields. (But no more. See http://bit.ly/eQmhOH)
> [...]
>
>
> Ah! Thanks! I've always hated searching for text on my poor little laptop. (I thought it had something to do with rendering the ellipses. Huh.)
>
> The last item on my short list of complaints about running DrRacket on a laptop is how slowly it renders syntax-highlighted text. (40 lines takes about 1/8 to 1/2 second, depending on file size.) Any ideas there?
>
>
> Something that I have said in the past a few times: IMO, it would be
> better to have an indirection layer when writing the preferences --
> most of the "transient" changes (like ones that happen after every
> keystroke or a result of moving or resizing the windows) could go
> through with a timer so that there are no such frequent writes,
> instead, they'd be lumped in less frequent writes.  Non-transient
> changes (eg, changing preferences) could still be done immediately, so
> there's no consistency issues with such changes.
>
>
> +1, if I get a vote. People get annoyed with GUIs when they have noticeable delays; i.e. > 50ms or so. This would help reduce them.

At the moment, it wouldn't. But I'd you notice slowness being
correlated with "P"s in you drracket then pls let us know. specific
problems are more likely to induce changes.

> +2 if, to maintain integrity, the preferences file is currently flushed or committed as well as streamed out.

It does that now.

Robby

> Neil
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
>


Posted on the dev mailing list.