[Cuis-dev] Bug fix: Image freezes when inspecting objects with huge #printOn: results

Juan Vuletich juan at cuis.st
Tue Oct 31 14:50:41 PDT 2023


Oh, BTW, you want an IdentityDictionary there. CompiledMethod>>#= is not 
what you are expecting...

Cheers,

On 10/30/2023 11:38 PM, Nicolás Papagna Maldonado via Cuis-dev wrote:
> Hi Juan,
>
> I'm glad there was a better solution!
> I didn't see the fiz coming from the Morphic side.
>
> Thank you.
>
> Cheers,
> Nico PM
>
> On Mon, Oct 30, 2023, 18:40 Juan Vuletich <juan at cuis.st 
> <mailto:juan at cuis.st>> wrote:
>
>     On 10/29/2023 6:28 PM, Nicolás Papagna Maldonado via Cuis-dev wrote:
>>     Hi folks,
>>
>>     The attached changeset fixes a bug that caused the image to
>>     freeze when inspecting objects with huge #printOn: results.
>>
>>     To reproduce the error:
>>
>>        1. Open a workspace
>>        2. Evaluate CompiledMethod allInstances inject: Dictionary new
>>           into: [ :dict :method |  dict at: method put: method
>>           sourceCode. dict ]
>>        3. An inspector will be opened on the dictionary created above
>>           Click on self
>>        4. Notice the image hangs while waiting for the #printOn:
>>           message send.
>>
>>     To fix this bug, I limited the time to print the selected item to
>>     300 milliseconds and showed an appropriate error message when
>>     that happened.
>>
>>     LMK your thoughts.
>>
>>     Cheers,
>>     Nico PM
>
>     Hi Nico,
>
>     I think that using #valueWithin:onTimeout: is like shooting a
>     mosquito with a gun. I preferred a solution with two parts:
>     - printing a Dictionary doesn't need to sort the keys.
>     Dictionaries are not sorted.
>     - Any stepping morph that takes longer than its #stepTime will be
>     limited in its stepping time so GUI stays (barely) responsive.
>
>     Updates now at GitHub.
>
>     Thanks,
>
>     -- 
>     Juan Vuletich
>     cuis.st  <http://cuis.st>
>     github.com/jvuletich  <http://github.com/jvuletich>
>     researchgate.net/profile/Juan-Vuletich  <http://researchgate.net/profile/Juan-Vuletich>
>     independent.academia.edu/JuanVuletich  <http://independent.academia.edu/JuanVuletich>
>     patents.justia.com/inventor/juan-manuel-vuletich  <http://patents.justia.com/inventor/juan-manuel-vuletich>
>     linkedin.com/in/juan-vuletich-75611b3  <http://linkedin.com/in/juan-vuletich-75611b3>
>     twitter.com/JuanVuletich  <http://twitter.com/JuanVuletich>
>


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231031/68fdb7b6/attachment.htm>


More information about the Cuis-dev mailing list