GTInspector is slow for large strings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GTInspector is slow for large strings

Damien Cassou
Hi,

if you inspect the following in Pharo 4, it will take a long time to
execute:

  'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl
  retrieveContents.


but if you execute this before, the inspecting above expression is much
faster:

GTInspector setGTInspectorEnabledStatus: false.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: GTInspector is slow for large strings

Andrei Chis
Hi,

It takes such a long time because for String objects the default presentation shows the content of the String. In this case the string has 10 million characters which Rubric takes some time to display.

Given you use case it could make sense to limit by default the size of content that is displayed and when this happens add an action for showing the entire content.

Cheers,
Andrei

On Wed, Feb 25, 2015 at 8:57 PM, Damien Cassou <[hidden email]> wrote:
Hi,

if you inspect the following in Pharo 4, it will take a long time to
execute:

  'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl
  retrieveContents.


but if you execute this before, the inspecting above expression is much
faster:

GTInspector setGTInspectorEnabledStatus: false.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill


Reply | Threaded
Open this post in threaded view
|

Re: GTInspector is slow for large strings

Pharo Smalltalk Developers mailing list
I’ve tried this:

 retrieveContents ] timeToRun 0:00:00:02.587

 [ 
GTInspector setGTInspectorEnabledStatus: false
  retrieveContents) inspect ] timeToRun 0:00:00:02.877

 [ GTInspector setGTInspectorEnabledStatus: true.
  retrieveContents) inspect ] timeToRun 0:00:00:50.129

RubScrolledTextMorph new 
openInWorld; 
 retrieveContents) ] timeToRun 0:00:00:04.543


So, Rubric takes 2 seconds to open and show this big text, 
the basic inspector takes 0.3 seconds to open but it shows the first characters only.
GTInspector takes 50 seconds.

I think the problems comes from GTInspector itself.
From MorphTreeMorph maybe which is used by GTInspector

Cheers
Alain


Le 25 févr. 2015 à 22:24, Andrei Chis <[hidden email]> a écrit :

Hi,

It takes such a long time because for String objects the default presentation shows the content of the String. In this case the string has 10 million characters which Rubric takes some time to display.

Given you use case it could make sense to limit by default the size of content that is displayed and when this happens add an action for showing the entire content.

Cheers,
Andrei

On Wed, Feb 25, 2015 at 8:57 PM, Damien Cassou <[hidden email]> wrote:
Hi,

if you inspect the following in Pharo 4, it will take a long time to
execute:

  'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl
  retrieveContents.


but if you execute this before, the inspecting above expression is much
faster:

GTInspector setGTInspectorEnabledStatus: false.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Reply | Threaded
Open this post in threaded view
|

Re: GTInspector is slow for large strings

Andrei Chis
Hi Alain,

On Wed, Feb 25, 2015 at 10:55 PM, Alain Plantec via Pharo-dev <[hidden email]> wrote:


---------- Forwarded message ----------
From: Alain Plantec <[hidden email]>
To: Pharo Development List <[hidden email]>
Cc: 
Date: Wed, 25 Feb 2015 22:55:21 +0100
Subject: Re: [Pharo-dev] GTInspector is slow for large strings
I’ve tried this:

 retrieveContents ] timeToRun 0:00:00:02.587

 [ 
GTInspector setGTInspectorEnabledStatus: false
  retrieveContents) inspect ] timeToRun 0:00:00:02.877

 [ GTInspector setGTInspectorEnabledStatus: true.
  retrieveContents) inspect ] timeToRun 0:00:00:50.129

RubScrolledTextMorph new 
openInWorld; 
 retrieveContents) ] timeToRun 0:00:00:04.543


So, Rubric takes 2 seconds to open and show this big text, 
the basic inspector takes 0.3 seconds to open but it shows the first characters only.
GTInspector takes 50 seconds.

I think the problems comes from GTInspector itself.
From MorphTreeMorph maybe which is used by GTInspector


Thanks for investigating this. 
I've opened an issue.


Cheers,
Andrei

 
Cheers
Alain


Le 25 févr. 2015 à 22:24, Andrei Chis <[hidden email]> a écrit :

Hi,

It takes such a long time because for String objects the default presentation shows the content of the String. In this case the string has 10 million characters which Rubric takes some time to display.

Given you use case it could make sense to limit by default the size of content that is displayed and when this happens add an action for showing the entire content.

Cheers,
Andrei

On Wed, Feb 25, 2015 at 8:57 PM, Damien Cassou <[hidden email]> wrote:
Hi,

if you inspect the following in Pharo 4, it will take a long time to
execute:

  'http://picasaweb.google.com/data/feed/api/all?q=puppy' asUrl
  retrieveContents.


but if you execute this before, the inspecting above expression is much
faster:

GTInspector setGTInspectorEnabledStatus: false.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill