Message9636
| Author |
zyasoft |
| Recipients |
amak, wdroste, zyasoft |
| Date |
2015年03月12日.05:18:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1426137523.47.0.952621318636.issue2230@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|