Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Caching extracted names
Caching extracted names [message #660456] Fri, 18 March 2011 14:26
Mark Christiaens is currently offline Mark ChristiaensFriend
Messages: 63
Registered: October 2010
Member
I was wondering if this piece of code from Xtext 2.0 is a good idea or not:

public static IScope scopeFor(Iterable<? extends EObject> elements, IScope outer) {
		return scopeFor(elements, QualifiedName.wrapper(SimpleAttributeResolver.NAME_RESOLVER), outer);
	}

As you can see, it uses a NAME_RESOLVER. That name-resolver seems to want to cache all the names extracted from the EObjects it analyzes. Is there any indication that such a cache is useful? My gut feeling tells me that extracting a name is cheap while using a synchronized cache (read/write lock) is not. In addition, I, for example, cache some of the results of my scoping at a higher level so this cache is probably generating a lot of misses.
---
Mark Christiaens
Discover the Future of VHDL Design
Go to www.sigasi.com
Previous Topic:reacting to change in referenced file
Next Topic:[xtext] is lexical analysis over syntactic analysis in xtext?
Goto Forum:
  


Current Time: Sat May 11 09:34:14 GMT 2024

Powered by FUDForum. Page generated in 0.02787 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top