Performance tip - $root.$prefs.$maxCacheClasses

Bryan Brodie brb at appimatic.com
Mon Dec 22 13:09:29 EST 2014


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
>
>



More information about the omnisdev-en mailing list