Closed eclipse-ocl-bot closed 1 month ago
By Sebastian Zarnekow on Jul 26, 2010 16:01
Hi Ed,
did you try to enable memoization for your parser?
By Ed Willink on Jul 26, 2010 16:09
No. What is memoization? There is no mention in the Xtext user guide.
By Sebastian Zarnekow on Jul 26, 2010 16:12
pleaes add
options = {\ backtrack = true\ memoize = true\ }
to the workflow that generates the parsers. It enables caching for the backtracking algorithm of Antlr.
By Ed Willink on Jul 26, 2010 16:49
Changing
options = { backtrack = true classSplitting = true }
to
options = { backtrack = true memoize =true classSplitting = true }
seems to make no difference to the speed.
By Ed Willink on May 04, 2011 14:46
Generalizing the grammar to avoid backtracking reduced the speed difference to perhaps two times.
By Ed Willink on May 20, 2013 07:39
Two times will do. Xtext2LPG is a separate issue.
By Ed Willink on May 27, 2014 09:43
CLOSED after more than a year in RESOLVED state.
By Ed Willink on May 27, 2014 09:52
and CLOSE
| --- | --- | | Bugzilla Link | 320703 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jul 23, 2010 05:50 EDT | | Modified | May 27, 2014 09:52 EDT | | Version | 3.0.0 | | Reporter | Ed Willink |
Description
Created attachment 175046\ JUnit tests to measure parser speed
Comparison of parser speed for RoyalAndLoyal.ocl suggests that the Xtext parser is eleven times slower than the LPG parser. (1.1 compared to 0.1 seconds for 350 lines). See MODELS 2010 OCL workshop paper submission for details.
[Something dreadful happens if the full LoadTest is run. Saving the Xtext results takes 60 seconds every time.]
:notepad_spiral: ModelsSpeed.patch