Commit 82ce17e1 authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

gserver: performance imporvement on adding using namespaces

parent 32a1379a
......@@ -164,7 +164,11 @@ public class GVls.GServer : GLib.Object, ContainerHashable, Server
var l = find_using_namespaces ();
for (int i = 0; i < l.get_n_items (); i++) {
var so = l.get_item (i) as StringObject;
found_using_directive (so.to_string ());
if (root_server != null) {
root_server.add_namespace (so.val);
} else {
add_namespace (so.val);
}
}
CodeContext.pop ();
keywords_update = true;
......
......@@ -80,13 +80,6 @@ public interface GVls.Server : GLib.Object, ContainerHashable
var isr = servers.find (k);
if (isr != null) return;
servers.add (s);
s.found_using_directive.connect ((ns)=>{
try {
add_namespace (ns);
} catch (GLib.Error e) {
message ("Error adding namespace from directive: %s", e.message);
}
});
}
public abstract Symbol? find_at (Location loc) throws GLib.Error;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment