May I use a stub index to resolve in own containing file?

Hi,
BashSupport is quite slow in resolving defintions in large bash files (4400 lines in a real-world test file). I'm trying to speed this up. I've profiled the code and it shows that var and function def resolving eats up most of the time.

1. Is it allowed to access the stubs in a call to resolve() of a PsiElement to look for definitions in the current file?

2. Are there any samples which resolve using an StubIndex? I'll loose the iteration order, I think, which is bad.

3. Can I force to get a strub tree for a file? My understanding is that I won't get a tree if some code accesses the ast... For resolving I'd like to force an stub tree.

4. Are there other ways to speed-up resolving and tree-walking?

Thank you very much for support!

Wallaby

Please sign in to leave a comment.