by
John Beaufoy >> Wed, 6 Jul 2005 11:12:53 GMT
a new 'methodTransient' command
I dont agree, the better option is to come up with a solution that is transparent to the code (like the Jade 6 cache-coherency). Introducing new statements like methodTransient will add complexity which we should be trying to remove. While Brendan has outlined these points already in detail, I'll reiterate the point that it would do nothing to help us with our existing systems.
While I would be very interested to see how the implementation would be put together, I wouldn't be dissapointed if it didn't appear in the product in the next year or two.
There are many points to consider, particularly:
- covering all the bases where a transient could actually get used again
- debugging, who deleted the transient, AGC or the app code
- when would the cleanup occur, would it invoke the delete methods
- at what levels could it be overriden.
My reluctance to jump on the AGC bandwagon is two fold, we might create as many issues or as much confusion as we hope to address, and the other unknown is what this would do to the performance of the interpretor/jom/cache mgmt etc.
Some interim measures then:
Jade provides warnings at compile time where it's obvious a transient isnt getting deleted (the iterator issue being a candidate here). Its not going to catch everything, but it's a good start and a good reminder to keep on top things. It could even suggest where to insert the delete into your code.
At runtime, Jade's diagnostic tools are enhanced to clearly expose transient leaks. To start with, this would be a running total of the number of transients for a process - a single count. If this number continues to grow while you are using the app, you know you have a problem. So you then want to see a breakdown of the totals by class exposing the problem ones. Then, you want to know which method created each of these transients, and method stack that goes with it.
Cheers,
John
NWI