Community
Participate
Working Groups
It seems that our current mechanism for handling timeouts causes significant performance problems. 1. For clients that do not supply an implementation of the parserTimeout() callback, it adds significant overhead to every token we look at. 2. For clients that do supply an implementation, the JIT cannot easily optimize the call, and our polling significantly slows down the parse. I propose that instead of having the client communicate to the parser through the callback, it instead can be done through an interface on IParser like: public void cancel(); The drawback is that the parser clients will need to manage its own event rather than having the Parser poll the callback.
I have committed a fix to the HEAD which implements IParser.cancel() appropriately. Bog, Chris, Hoda, please review my fixes in your components and feel free to make it work better. Do note that this work will be merged into 2.0.1 next month. I will mark the defect as resolved at that point.
Chris ... I did not update the type cache to use this mechanism. I left a //TODO there for you to catch your eye.
Looks good to me. Thanks John.
Type Cache updated in HEAD - should be applied to 2.0.1 once parser work is complete.
Created attachment 13567 [details] patch to support IParser.cancel()
The merge from HEAD to 2_0 branch is complete. JUnits validating these fixes have been committed to both branches. Marking as RESOLVED - FIXED. The next available 2.0.1 build shall contain these fixes along with Parser performance/scalability improvements.