the fastest way to load external code

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

the fastest way to load external code

Tudor Girba-2
Hi,

I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.

For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:

ReRuleManager uniqueInstance unsubscribe.
GTExampleOrganizer instance stopSystemAnnouncements.

What else do you see around?

Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"Don't give to get. Just give."







Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Peter Uhnak
For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:

You can just do this and not worry about subscribers

SystemAnnouncer uniqueInstance suspendAllWhile:

(I was trying to speed up code generation so I did some benchmarks last year http://forum.world.st/fast-subclassing-class-creation-in-tests-tp4857779p4858005.html )

Also couple weeks back I found out that adding instance variable to a class is extremely slow and it's best to add them during the initial setup, but maybe that isn't a problem here.

Peter


On Sat, May 21, 2016 at 9:50 PM, Tudor Girba <[hidden email]> wrote:
Hi,

I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.

For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:

ReRuleManager uniqueInstance unsubscribe.
GTExampleOrganizer instance stopSystemAnnouncements.

What else do you see around?

Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"Don't give to get. Just give."








Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Tudor Girba-2
Hi,

> On May 21, 2016, at 10:47 PM, Peter Uhnák <[hidden email]> wrote:
>
> > For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>
> You can just do this and not worry about subscribers
>
> SystemAnnouncer uniqueInstance suspendAllWhile:

Indeed. The problem with this is that RPackage will get out of sync.

> (I was trying to speed up code generation so I did some benchmarks last year http://forum.world.st/fast-subclassing-class-creation-in-tests-tp4857779p4858005.html )

Thanks for the pointer.

> Also couple weeks back I found out that adding instance variable to a class is extremely slow and it's best to add them during the initial setup, but maybe that isn't a problem here.

Indeed, I noticed that, too.

Cheers,
Doru


> Peter
>
>
> On Sat, May 21, 2016 at 9:50 PM, Tudor Girba <[hidden email]> wrote:
> Hi,
>
> I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.
>
> For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>
> ReRuleManager uniqueInstance unsubscribe.
> GTExampleOrganizer instance stopSystemAnnouncements.
>
> What else do you see around?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Don't give to get. Just give."
>
>
>
>
>
>
>
>

--
www.tudorgirba.com
www.feenk.com

"It's not what we do that matters most, it's how we do it."


Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Eliot Miranda-2
In reply to this post by Tudor Girba-2
Hi Doru,

> On May 21, 2016, at 12:50 PM, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
> I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.
>
> For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>
> ReRuleManager uniqueInstance unsubscribe.
> GTExampleOrganizer instance stopSystemAnnouncements.
>
> What else do you see around?

Strikes me that parsing, not compiling and either holding onto the source String or simply keeping a pointer into the source file makes sense.  Compilation to methods can wait until installation.  With that approach you need no notifications at all.  HTH


_,,,^..^,,,_ (phone)

>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Don't give to get. Just give."
>
>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Max Leske
Another thing you can do (but be careful) is to close the changes file. Sources (and change operations) will then not be written to disk which saves a lot of I/O operations. I use this for some special imports. I’m not sure however, how well that will work in Pharo 5 (I’ve been doing this in Pharo 1.3).

Cheers,
Max

> On 21 May 2016, at 23:51, Eliot Miranda <[hidden email]> wrote:
>
> Hi Doru,
>
>> On May 21, 2016, at 12:50 PM, Tudor Girba <[hidden email]> wrote:
>>
>> Hi,
>>
>> I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.
>>
>> For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>>
>> ReRuleManager uniqueInstance unsubscribe.
>> GTExampleOrganizer instance stopSystemAnnouncements.
>>
>> What else do you see around?
>
> Strikes me that parsing, not compiling and either holding onto the source String or simply keeping a pointer into the source file makes sense.  Compilation to methods can wait until installation.  With that approach you need no notifications at all.  HTH
>
>
> _,,,^..^,,,_ (phone)
>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "Don't give to get. Just give."
>>
>>
>>
>>
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Tudor Girba-2
Hi,

Interesting. How do I do that?

Doru

> On May 22, 2016, at 9:49 AM, Max Leske <[hidden email]> wrote:
>
> Another thing you can do (but be careful) is to close the changes file. Sources (and change operations) will then not be written to disk which saves a lot of I/O operations. I use this for some special imports. I’m not sure however, how well that will work in Pharo 5 (I’ve been doing this in Pharo 1.3).
>
> Cheers,
> Max
>
>> On 21 May 2016, at 23:51, Eliot Miranda <[hidden email]> wrote:
>>
>> Hi Doru,
>>
>>> On May 21, 2016, at 12:50 PM, Tudor Girba <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.
>>>
>>> For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>>>
>>> ReRuleManager uniqueInstance unsubscribe.
>>> GTExampleOrganizer instance stopSystemAnnouncements.
>>>
>>> What else do you see around?
>>
>> Strikes me that parsing, not compiling and either holding onto the source String or simply keeping a pointer into the source file makes sense.  Compilation to methods can wait until installation.  With that approach you need no notifications at all.  HTH
>>
>>
>> _,,,^..^,,,_ (phone)
>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>>
>>> "Don't give to get. Just give."
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>

--
www.tudorgirba.com
www.feenk.com

"Speaking louder won't make the point worthier."


Reply | Threaded
Open this post in threaded view
|

Re: the fastest way to load external code

Max Leske

> On 22 May 2016, at 10:43, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
> Interesting. How do I do that?

        [
                Smalltalk closeSourceFiles.
                "do your thing"
        ] ensure: [ Smalltalk openSourceFiles ]

Seems to work in Pharo 5 too, as far as I can tell.

>
> Doru
>
>> On May 22, 2016, at 9:49 AM, Max Leske <[hidden email]> wrote:
>>
>> Another thing you can do (but be careful) is to close the changes file. Sources (and change operations) will then not be written to disk which saves a lot of I/O operations. I use this for some special imports. I’m not sure however, how well that will work in Pharo 5 (I’ve been doing this in Pharo 1.3).
>>
>> Cheers,
>> Max
>>
>>> On 21 May 2016, at 23:51, Eliot Miranda <[hidden email]> wrote:
>>>
>>> Hi Doru,
>>>
>>>> On May 21, 2016, at 12:50 PM, Tudor Girba <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am looking for ways to make loading of code from an st file faster. To this end, I would like to find in-image mechanisms that are not mandatory for obtaining a functional image.
>>>>
>>>> For example, one place I look at is SystemAnnouncer uniqueInstance, and I know that I should have no Nautilus open and that I can disable Renraku and GTExample:
>>>>
>>>> ReRuleManager uniqueInstance unsubscribe.
>>>> GTExampleOrganizer instance stopSystemAnnouncements.
>>>>
>>>> What else do you see around?
>>>
>>> Strikes me that parsing, not compiling and either holding onto the source String or simply keeping a pointer into the source file makes sense.  Compilation to methods can wait until installation.  With that approach you need no notifications at all.  HTH
>>>
>>>
>>> _,,,^..^,,,_ (phone)
>>>
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>> www.feenk.com
>>>>
>>>> "Don't give to get. Just give."
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Speaking louder won't make the point worthier."
>
>