Invalidation of all PSI when there's a filesystem change?

As of 2017.3.1 we notice that calls "invalidateAllPsi()" as part of its "rootsChanged()" method.

This is a very destructive change for us -- it causes all of our DOM-based editors to blank out and need to be closed and re-opened whenever the fsnotifier notices changes. (One of the scenarios where this seems to happen is compilation, but there are others.)

How is a DOM-based editor expected to respond to this invalidation? Can someone point me to an example of how to do this properly?


1 comment

We are seeing this with any UI built on top of BasicDomElementComponent. All of our test users have reported it as soon as they upgraded to 2017.3 

It seems to me that invalidating all of the Psi in an open project would be an expensive operation with far-reaching consequences.I might be able to work around this, if someone can tell me how to get things that use BasicDomElementComponent to refresh themselves when they've been invalidated. I worry about performance, though.

This looks like it was done to fix a problem in PyCharm - PY-25892 - and I am really surprised I am the first person to report issues related to it. 



Please sign in to leave a comment.