pharo icon indicating copy to clipboard operation
pharo copied to clipboard

The first you use "doit" in the Playground it takes around 5 seconds

Open Ducasse opened this issue 3 years ago • 13 comments

Seb showed me this today in P11

Ducasse avatar Apr 12 '23 16:04 Ducasse

With objects like literals or even classes I do not see that.

Which object did he inspect?

MarcusDenker avatar Apr 17 '23 13:04 MarcusDenker

@jordanmontt Hi seb can you describe what you observed? Tx

Ducasse avatar Apr 17 '23 18:04 Ducasse

Hello, this happens the first time that I open an Inspector for any object, it takes at least 5 seconds to the Inspector to be opened and my image freeze entirely. The same happens when I open a Playground that is a subclass of the Inspector.

This happens since a time in both Pharo 11 and 12. I will upload a GIF later and also I will profile it.

jordanmontt avatar Apr 18 '23 07:04 jordanmontt

It might be good to have an idea of where it comes from with the profiling because I don’t have this problem either

jecisc avatar Apr 18 '23 08:04 jecisc

Now in Pharo 12 the problem does not happen with the Playground, only with the inspector. Here you can see that I try to inspect the number 5 in a brand new image for the first time.

Enregistrement-de-lecran-2023-04

jordanmontt avatar Apr 18 '23 09:04 jordanmontt

I got the problem, almost all the time is passed in the method NetNameResolver class>>#primInitializeNetwork:. I think that the issue is related to some old issue that the first time Pharo takes at least 5 seconds to be open because it uses some network address to create a UUID.

In the profiler doing a 5 inspect takes 5 seconds (5206 ms) and almost all of the time is passed in the method NetNameResolver class>>#primInitializeNetwork:. Probably the 5 seconds is because of a timeout, so at the end the UUID is created without the network address.

I am using a MacBook pro 2015 with Intel btw

jordanmontt avatar Apr 18 '23 09:04 jordanmontt

Capture d’écran 2023-04-18 à 11 20 44

jordanmontt avatar Apr 18 '23 09:04 jordanmontt

Maybe related issue: https://github.com/pharo-project/pharo/issues/11725

jordanmontt avatar Apr 18 '23 09:04 jordanmontt

Just for the records: no delay on Windows with Pharo 12. Works there as expected

astares avatar Apr 18 '23 13:04 astares

Coming back to this issue:

  • For the inspector, this happens only the first time that you open one. After, if one saves the image, the inspector opens quickly even after closing and opening the image.
  • For the Spotter this happens all the times that you open an image, even if you saved.

It's kind of annoying. Waiting 5 seconds with a frozen image made me not to use the Spotter anymore. Also, why is the Spotter asking for a UUID every time that the image is opened? Why not only once like the inspector

jordanmontt avatar Jun 01 '23 20:06 jordanmontt

I still always have this on my machine in Pharo13.

Ducasse avatar Aug 03 '24 10:08 Ducasse

It gives a bad feeling.

Ducasse avatar Aug 03 '24 10:08 Ducasse

I get the same with Spotter.

Ducasse avatar Aug 03 '24 10:08 Ducasse

This has been fixed

jecisc avatar Mar 25 '25 15:03 jecisc