call site read strategy learning

Igor Stasenko siguctua at gmail.com
Wed Aug 15 19:11:43 UTC 2007


I wonder, is it possible to implement a something which will learn
till code runs?
Lets say i have in some method a block, which invokes code for
accessing some db objects  and/or does some manipulations with them.
What if at first invocation startup magma will learn from this
process, so the next time it enters this block of code, it will
already know how deep particular object types must be read to be
optimal for speed/space?

something as easy as:

handle := session captureReadStrategy: [ some code ].

and then:

session withReadStrategy: handle do: [ some code ].

or ever:
session useAndCapture: handle do: [some code].

I think it can be clever enough to use as default approach for
creating read strategies, so developers will be freed from making tons
of tests and supposes for making static read strategies work fine with
their code.

Even, if its not or hard to adopt, i think some analysis can be done
while running user code (like messagetally), so developer can then
make decisions based on it.

-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Magma mailing list