PyCharm freezes when LocalInspectionTool plugin makes lots of HTTP requests
已回答
I've written a LocalInspectionTool in Kotlin that has to make quite a few HTTP requests as part of executing its checkFile() method. I'd have expected that this would all happen in the background and the results of the inspection would be shown once those requests completed. However, instead PyCharm seems to freeze up (the UI becomes completely unresponsive) at times while the plugin is running. Is it expected that a plugin checking a file would block the UI thread, or is something else going on here?
请先登录再写评论。
LocalInspectionTool is meant for on-the-fly analysis and should use PSI and other local data to determine results. It seems ExternalAnnotator will be a better choice for your use-case https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#external-tool