Comments (7)
And a little post scriptum: seems like extension parses the document for symbols on each file switch / reopen. Maybe change it, so it triggers only on file modification?
from unrealscript-language-service.
This could definitely be done better, but basically VSCode is waiting for the server to respond as it is still indexing all the dependencies, which is why it's sometimes not showing up, some classes have a dependency with even more dependencies, so it can take quite a while before it is able to respond to the symbols request.
You can see what the server is doing under "Output > UnrealScript" to confirm.
from unrealscript-language-service.
I have two solutions for this that may make this more responsive:
- Respond as soon as the document has sufficient data to feedback the symbols data.
- As request, re-parse the entire document and just collect the symbols from the AST, bypassing the indexation of the document as we don't need any semantics here. This however is a bit wasteful :)
from unrealscript-language-service.
And a little post scriptum: seems like extension parses the document for symbols on each file switch / reopen. Maybe change it, so it triggers only on file modification?
This was done by design to ensure that the server is working the correct up-to-date document, for instance if you open a document and make some unsaved changes, and proceed to close this document, the server will re-process the document without any of the unsaved changes.
Surely this can be optimized, but it is not crucial as it has almost no impact on performance.
from unrealscript-language-service.
What comes to my mind at first - cache everything in the workspace? Most of the files, especially the game source code that you make mods for, never change. So you can just check the md5-file date and use the cached dependency and symbol tree. It will speed up the startup and new file opening significantly.
But honestly, I don't know how it's done and what's the best practice / the easiest way to do it in VSCode, so up to you, I guess.
from unrealscript-language-service.
Yeah, but this is out of scope for now, as the current approach may still be changed drastically, it would be a lot of work to keep a persisted cache compatible.
I solved this by waiting for the document to be indexed before the server sends a result of symbols. This fixes the issue where a list of symbols never gets retrieved.
However this may still take (seconds) if the server is indexing multiple documents, this can definitely be improved on later, by responding right before indexing as we don't need the all the info that gets indexed.
from unrealscript-language-service.
This fixes the issue where a list of symbols never gets retrieved.
This is fine too, I'm used to wait a little bit for indexing. Thanks!
from unrealscript-language-service.
Related Issues (20)
- [Bug 0.6.3]: Expression does not evaluate to an iteratable HOT 2
- [Bug 0.6.3]: Delegates in `defaultproperties` / `sub objects` are not processed properly HOT 1
- [Bug 0.6]: Type checking error when passing an Enum object to a function as argument
- [Bug 0.6]: Enum tag reference in a condition expression produces an error when type checking is enabled
- [Bug 0.6]: Type not found when assigning to a sub object if using an object literal
- [Bug 0.6.3]: [Error - 9:40:23 PM] Request textDocument/documentSymbol failed. HOT 1
- [Bug]: Objects and Subobjects show errors in defaultproperties HOT 2
- [Bug]: Server crashing during glob HOT 6
- [Feature Request]: Publish to Open VSX HOT 2
- [Feature Request]: struct modifier HOT 2
- [Feature Request]: Show `const` hints for strings HOT 2
- [Bug]: Can't find .uc files in the same folder HOT 3
- [Bug]: Extension Can't find a function from another .uc file HOT 4
- [Bug]: Casting to a class may mismatch a package (or class) of the same name HOT 1
- [Bug]: Missing highlighting in v0.6.5+ HOT 2
- [Bug]: Declaring static array size from variable fails in some cases HOT 1
- [Bug]: [v0.7.1] highlight source code as comment by mistake. HOT 1
- [Bug]: Error: cannot consume EOF HOT 1
- [Bug]: [v0.7.1] highlight source code as comment by mistake HOT 5
- [Bug]: "mismatched input 'if' expecting 'until'"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrealscript-language-service.