[Mono-list] About intellisense, mono, emacs

Miguel de Icaza miguel@ximian.com
17 Apr 2003 17:38:43 -0400


Hello,

> Second of all is *speed*.  Reflection isn't blazing fast; it takes a
> good 30 seconds (or more!) to run the Gtk# treeviewdemo.exe, which uses
> reflection against all assemblies it can find to list all classes and
> their members.  (This is on my laptop, which isn't the fastest machine
> running around.)  (As a shameless plug, Type Reflector can do the same
> thing much faster, but it uses lazy evaluation to achieve the perceived
> speed increase.)

Actually, reflection is pretty fast.  

You are comparing a different problem, which is a full enumeration of
all the types and methods, and the creation of hundreds of thousands of
images and nodes (no delayed node creation), and it also does with an
update cycle that keeps the UI fresh, but causes hundreds of redraws.

That being said, the issue to implement Intellisense is that you need a
pretty smart parser that can figure out the actual type of a variable,
so some sort of limited parsing is required, as in:

	MyObject p;

	p.

When you parse "p" you have to look back and track what p is.  It can be
a local variable, a parameter, a field or a property.  

The field/property can be defined before, or can be defined *after* in
the same class.  Or even worse, in a base class, or in an interface.  To
spice things up, you have to use the resolution rules for names, and
lookup any "using" statements at the beginning of your file ;-)

Miguel.