[Cuis-dev] Slow keyboard input

Luciano Notarfrancesco luchiano at gmail.com
Sat Jan 29 00:06:13 PST 2022


Hi Juan,
I start from the newest image from the repo, install new updates, and then
load all TrueType fonts.
It’s not a very big deal, it’s usable now that I fixed my own code to avoid
forcing everything to redraw every second, and feels even smoother with
HybridCanvas. Anyway I looked at it a little with AndrasSystemProfiler and
it seems that every keystroke on a workspace triggers redrawing the full
workspace, spending time mostly filling the background twice (first for
WorkspaceWindow and then TextModelMorph). But I don’t understand all the
details of how the world is drawn, maybe this is perfectly normal. And I
guess it is nontrivial to compute a smaller area to redraw when a character
is added.
Also, if I open a browser, then open the halos in the browser and move the
mouse pointer over the system categories list, every time a list item is
highlited the whole browser is redrawn. This doesn’t happen without the
halo, in that case only the unhighlighted and highlighted items are
redrawn. To see the redrawing I changed BoxedMorph>>drawOn: to use ‘Color
random’ instead of ‘color’.

On Sat, 29 Jan 2022 at 6:58 AM Juan Vuletich <JuanVuletich at zoho.com> wrote:

> Hi Luciano,
>
> On 1/28/2022 2:04 PM, Luciano Notarfrancesco via Cuis-dev wrote:
>
> Fantastic, this solved most of the problems, thank you! I’m using
> HybridCanvas for now and it feels very smooth.
>
>
> Good.
>
> Part of the problem was that my window manager was stepping every 1 second
> to make sure that windows were properly layedout (to account for when the
> Cuis window changes size, for example). This was a bug, and was causing
> everything to be redrawn every second, but it was not slow enough to be
> noticeable until I tried it with full vector graphics. Now I fixed it to
> avoid unnecessary redraws.
>
>
> Excellent!
>
> I still think there might be a bug somewhere. The fact that a browser with
> halo feels slower than a browser with no halo is kind of weird. Also text
> input shouldn’t feel much slower with vector graphics, I suspect something
> is being unnecessarily redrawn on every keystroke.
>
>
> Running the stock Cuis image I don't see either of those problems. Can you
> share the image you are using so I can see and try to understand the
> problem?
>
> Thanks,
>
>
>
> Hi Luciano,
>>
>> This may be due to using VectorCanvas for all drawing. Try evaluating
>> `MorphicCanvas activeSubclass: HybridCanvas.` to use BitBlt for
>> unzoomed/unrotated windows, with full VG capabilities, or `MorphicCanvas
>> activeSubclass: BitBltCanvas.` to completely disable VG (while keeping TTF
>> working).
>>
>> Please tell how it goes.
>>
>> Thanks,
>>
>> --
>> Juan Vuletichwww.cuis-smalltalk.orghttps://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Devhttps://github.com/jvuletichhttps://www.linkedin.com/in/juan-vuletich-75611b3https://independent.academia.edu/JuanVuletichhttps://www.researchgate.net/profile/Juan-Vuletichhttps://patents.justia.com/inventor/juan-manuel-vuletich
>> @JuanVuletich
>>
>>
>
> --
> Juan Vuletichwww.cuis-smalltalk.orghttps://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Devhttps://github.com/jvuletichhttps://www.linkedin.com/in/juan-vuletich-75611b3https://independent.academia.edu/JuanVuletichhttps://www.researchgate.net/profile/Juan-Vuletichhttps://patents.justia.com/inventor/juan-manuel-vuletich
> @JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220129/6e36d5df/attachment-0001.htm>


More information about the Cuis-dev mailing list