Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356507 - [Xbase] Slow validator on chained method calls (with Clojures?)
Summary: [Xbase] Slow validator on chained method calls (with Clojures?)
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 376037
Blocks:
  Show dependency tree
 
Reported: 2011-09-01 14:45 EDT by Benjamin Schwertfeger CLA
Modified: 2017-10-31 10:57 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schwertfeger CLA 2011-09-01 14:45:11 EDT
I noticed in a large xtend-file, that a long line of method calls leads to very bad editing experience. The following small example leads to visible Xtext validation for seconds. If not on your machine feel free to duplicate the .map line.

class Test {
	def test() {
		Collections::singleton("")
		.map([String e|e])
		.map([String e|e])
		.map([String e|e])
		.map([String e|e])
		.map([String e|e])
	}
}

I had a more complex construct at office with the nighly build from 20110830, where also updating resource description took it's time.
Comment 1 Benjamin Schwertfeger CLA 2011-09-02 01:49:47 EDT
This does not work with a chain of .filter(typeof(String)) but with a chain of .filter(e|e!=null).
Comment 2 Sebastian Zarnekow CLA 2011-10-09 15:33:14 EDT
I made some first improvements that will at least be a lot faster if you explicitly define the parameter types for closure arguments like in comment 0.
Comment 3 Sebastian Zarnekow CLA 2011-11-09 14:51:01 EST
Not 2.1
Comment 4 Dennis Huebner CLA 2013-02-13 05:14:24 EST
Fixed with the new TS (for valid code)
Comment 5 Eclipse Webmaster CLA 2017-10-31 10:46:16 EDT
Requested via bug 522520.

-M.
Comment 6 Eclipse Webmaster CLA 2017-10-31 10:57:31 EDT
Requested via bug 522520.

-M.