Message9636
William, thanks for taking a look at this. Re your points:
1. Stack traces in Java are expensive when compared to simply using exceptions. But we are certainly making this be even more expensive in Py#getStackTrace, which is simply ancient code in Jython that parses the stack trace string representation, instead of using http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#getStackTrace(), available since Java 1.4. (hg blame shows that this code still has parts unchanged from when Jim Huginin and Barry Warsaw worked on it 16-17 years ago!)
2. If at all possible, you want to use code objects that are already compiled and invoke them, vs recompiling every single time. Basically every time you eval/compile something on Jython, no matter how small, it creates a class and loads it with a classloader. So I think this is the right strategy, even if it means we don't have such a good performance test :)
3. Re weak references - this is certainly true of your scenario, however, it causes memory leaks for other usage. So this seems to be the best compromise. Providing a pluggable map for class_to_type would be even better of course. |
|
Date |
User |
Action |
Args |
2015-03-12 05:18:43 | zyasoft | set | messageid: <1426137523.47.0.952621318636.issue2230@psf.upfronthosting.co.za> |
2015-03-12 05:18:43 | zyasoft | set | recipients:
+ zyasoft, amak, wdroste |
2015-03-12 05:18:43 | zyasoft | link | issue2230 messages |
2015-03-12 05:18:42 | zyasoft | create | |
|