Performance tip - $root.$prefs.$maxCacheClasses
Doug Easterbrook
doug at artsman.com
Mon Dec 22 13:27:27 EST 2014
sorry about that..
you can set as an omnis preference, or in code.. you can either
Do $root.$prefs.$maxcachedclasses.$assign(3000)
or
calculate $root.$prefs.$maxcachedclasses as 3000
I'm glad it improved performance. I seem to think it did the same for me -- and I saw some 2x performance in re-opening windows that I hadn't touched for a while, especially if they were heavy with sub windows, toolbars and lots of 'things within things'
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 536-1205 Fax (403) 536-1210
> On Dec 22, 2014, at 11:09 AM, Bryan Brodie <brb at appimatic.com> wrote:
>
> Doug,
>
> Thanks for this tip - it boosted performance in my dev environment
> substantially under OSX 10.10 Yosemite.
>
> FYI, I had to code this specifically as:
> Do $root.$prefs.$maxcachedclasses.$assign(3000)
>
> When I tried "$maxCacheClasses" it failed to pass syntax checking
>
> My 2¢
>
> Bryan Brodie
> cloudxix.com / appimatic.com
>
> On Mon, Dec 22, 2014 at 12:00 PM, <omnisdev-en-request at lists.omnis-dev.com>
> wrote:
>
>> From: Doug Easterbrook <doug at artsman.com>
>> Subject: Performance tip - $root.$prefs.$maxCacheClasses
>>
>> hi all:
>>
>> I was playing around with our Omnis Studio library on the weekend - which
>> has some 3000+ classes in it. It performs really well, but I hit a small
>> snag trying to make it perform well under the scenario where the library
>> was not on the same drive as the application… There is a reason that I
>> want the library on a server (macintish - network user situation)
>>
>> performance went down - dismally.
>>
>> and then I discovered my saviour — a preference that can be set at run
>> time.
>>
>>
>> $root.$prefs.$maxCacheClasses
>>
>>
>> initally it was set to 300 (as it has been for years)…. and so I set it up
>> at 5000 - just for giggles. After the initial load of my library by
>> the omnis runtime, I got a bunch of performance back because more of the
>> classes are being stored in ram.
>>
>> so if you are not aware of this setting — its worth knowing.
>>
>> you can also look at
>> sys(190) - to see the number of classes loaded by the runtime and
>> sys(191) - to see the number of classes discarded out of cache
>>
>>
>> its really a lot faster if your app is not discarding classes out of the
>> cache because $root.$prefs.$maxCacheClasses is set too low.
>>
>> thats my learning for the weekend. hope it helps somebody.
>>
>> Doug Easterbrook
>> Arts Management Systems Ltd.
>> mailto:doug at artsman.com
>> http://www.artsman.com
>> Phone (403) 536-1205 Fax (403) 536-1210
>>
>>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list