the fastest way to load external code
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."
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-tp4857779p485... ) 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 <tudor@tudorgirba.com> 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."
Hi,
On May 21, 2016, at 10:47 PM, Peter Uhnák <i.uhnak@gmail.com> 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-tp4857779p485... )
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 <tudor@tudorgirba.com> 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."
Hi Doru,
On May 21, 2016, at 12:50 PM, Tudor Girba <tudor@tudorgirba.com> 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."
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 <eliot.miranda@gmail.com> wrote:
Hi Doru,
On May 21, 2016, at 12:50 PM, Tudor Girba <tudor@tudorgirba.com> 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."
Hi, Interesting. How do I do that? Doru
On May 22, 2016, at 9:49 AM, Max Leske <maxleske@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Doru,
On May 21, 2016, at 12:50 PM, Tudor Girba <tudor@tudorgirba.com> 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."
On 22 May 2016, at 10:43, Tudor Girba <tudor@tudorgirba.com> 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 <maxleske@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Doru,
On May 21, 2016, at 12:50 PM, Tudor Girba <tudor@tudorgirba.com> 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."
participants (4)
-
Eliot Miranda -
Max Leske -
Peter Uhnák -
Tudor Girba