Bug 69872 - [Parser] revisit timeout strategy
Summary: [Parser] revisit timeout strategy
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: John Camelon CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66829
  Show dependency tree
 
Reported: 2004-07-12 16:00 EDT by John Camelon CLA
Modified: 2014-01-28 21:46 EST (History)
4 users (show)

See Also:


Attachments
patch to support IParser.cancel() (2.89 KB, patch)
2004-07-23 12:29 EDT, Chris Wiebe CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Camelon CLA 2004-07-12 16:00:02 EDT
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.
Comment 1 John Camelon CLA 2004-07-21 14:11:24 EDT
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.  
Comment 2 John Camelon CLA 2004-07-22 09:08:25 EDT
Chris ... I did not update the type cache to use this mechanism. 
I left a //TODO there for you to catch your eye. 
Comment 3 Hoda Amer CLA 2004-07-22 11:40:35 EDT
Looks good to me. Thanks John.
Comment 4 Chris Wiebe CLA 2004-07-23 12:27:23 EDT
Type Cache updated in HEAD - should be applied to 2.0.1 once parser work is
complete.
Comment 5 Chris Wiebe CLA 2004-07-23 12:29:58 EDT
Created attachment 13567 [details]
patch to support IParser.cancel()
Comment 6 John Camelon CLA 2004-08-10 13:31:06 EDT
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.