Yeah, Uniform Function Call Syntax completion functionality is about to be implemented soon. But unfortunately there’s a little issue, even in the rough pre-stage version I just uploaded: Performance.
It’s taking approximately 2.5 Milliseconds to resolve a user-defined symbol, like string, MyClass or simply Object.
But now there are about 200-300 globally defined methods which have to be checked – so from each function it takes the first parameter, and resolves it – it assignes a known reference e.g. to that “string” identifier in order to compare that one against the expression given before, like “Hello World”.
So it’s obviously easy to guess that 200 times ~2 milliseconds is a hell of a performance.
Even if I reduced it to 1 millisecond per check (what’s quite impossible in most cases) it’d still be laggy.
One solution: Multithreading. Gotta try this.
[Edit]
Yepp, it’s at least 2-3x faster now – not bad at all, but definitely not perfect yet.
Test it on your own – you’ll notice the ‘small’ delay when typing a dot. I just uploaded it. It’s only needed to reinstall Mono-D so far.
[Edit.2]
Found a way to reduce the timespan by further 40-50%. Got to test it on several machines to get sure.

4 Comments
I have to admit I haven’t looked at the Mono-D / Monodevelop source code at all, but couldn’t Mono-D keep a ‘list’ (there are probably better container types for this) of all possible UFCS functions (free functions, at least one parameter), sorted by the first parameter? So you wouldn’t have to resolve the first parameter for all functions, only for those with different first parameters?
One thing I don’t understand is this: When searching for UFCS functions, do we know the type of the expression for which we are searching the UFCS functions? If we know the type, why can’t we just search for that type in the sorted list of UFCS methods and use those results? (And do the same for all basetypes as well)?
So a kind of caching – after creating the global parse cache at startup time it shall check all free functions of all modules and enlist the results in one large method/first param-dictionary – no problem so far.
, though I don’t know about how much additional memory usage there will be due to the huge amount of functions.
After this, i.e. when typing a dot or something it only has to check if the expression (yes we know the type of it) in front of the dot is of the same type as the methods’ first parameters. — Nice!
Hey Alex, could you explain a bit about what this UFCS completion does? I’ve not heard of the term before and can’t find any reference to it via google…
I’ve put an explanation into a new article