Have you tried
to remove caching from existing Magritte programs to
test if it is really slower?
Sure it is much slower, I profiled it when implementing the cache. I
just redid the test in the latest version and it shows that the cache
improves the description retrieval by a factor of 7000, of course
depending on the object hierarchy of the queried class. The reason it
is so slow is basically the use of #allSelector, that could be
improved (with more clever code or pragmas). Still I guess the factor
of 10^3 would stay the same.
Lukas
Well, being slower, doesn't at all imply that it's too slow, so a better
question is in the overall rendering of a page, say a complex edit form,
what percentage of total rendering time is taken by retrieving the
description both cached and uncached. I mean, it could be dwarfed by
the call to goods(or whatever db you use) to actually retrieve the
objects, and if that's the case, running uncached may not even be
noticeable. Caching may not be necessary at all, in the larger scheme
of things, and frankly, I find myself flushing the cache constantly,
especially during development.