Open ghost opened 9 years ago
@faizkhan00 : just to add to that subject: we also see that in other languages there is also a strange delay for outline init.
30 seconds is too long, it should be much faster. Could you give me an example of a plugin that demonstrates this problem.
@nightwing on our system we regularly see 30 second waits until the outlines load, this is for any language, including javascript (might be worth mentioning we have turned collab on our instance too). https://github.com/c9/c9.ide.language.javascript
Do you see the same delay without collab?
@nightwing locally, no- it seems to only be with collab turned on.
I've seen something like this for non-jsonanalyzer, and I thought I filed a ticket. Can't find it, though. What I think happens is that the initial outline is triggered while the plugin isn't loaded, and the plugin registering doesn't trigger a refresh "of all the things in the worker". So the actual outline only shows up once the outline is regenerated, either by an edit, or a timeout?
@Pike Something close to this is probably happening; I noticed the c9 language plugin does something to compensate, ie. https://github.com/c9/c9.ide.language/blob/master/outline.js#L186-L192 and I'm wondering if this is whats happening, and our plugin is just failing to load fast enough to catch the next timeout.
... cringe ...
I'd try to add to onChangeMode() in the "registered" callback in https://github.com/c9/c9.ide.language/blob/master/language.js#L526 instead.
Hm, would that work for serverside (jsonalyzer) plugins as well? I'll need to look into that as it does seem promising...
Hello, we're developing a language plugin using jsonanalzyer, and we're seeing a situation where the loading of the outlines takes about 30 seconds (after) we have access to the IDE. Is there any way to speed up the lazy loading of outlines, and in general make the loading faster so that the plugin is registered without delay?