metaborg/spoofax-pie

Spoofax 3 in Eclipse slow in large project

Virtlink opened this issue · 3 comments

Summary

The WebDSL syntax is spread across about 30 files. Changing any of the files results in the notification:

The user is waiting for "SDF3 editor update" to complete

Which takes about 10 seconds to disappear. Subsequently, I can type a bit, but when I save or type in a different file, the notification appears again for a while.

What you did

I am editing the attached WebDSL project in Spoofax 3.

What you expected to happen

I expected the editor to not interfere with normal usage.

What actually happened

I have to wait a lot.

Context

  • Spoofax version: 0.13.0 (01-10-2021)
  • Operating system & version: macOS 11.5.2
  • Java version: embedded JRE
  • Eclipse version: pre-built 2021-09 with JRE from here
  • Gradle version: N/A

Additional information

Project in which this occurs:

📂 webdsl.zip

Similarly, if you try to create a file of this language (e.g., test.app) either in the language workbench or in a separately started Eclipse editor, any edit takes forever.

Gohla commented

SDF3 checking could be slow due to the naive way we use the constraint analyzer; we create a fresh context every time so there is no reuse. I'd need to extend PIE to be able to store state internal to tasks, so we can store the constraint analyzer context. That might improve performance. It could also just be that the SDF3 analysis with Statix is slow.

Gohla commented

I don't think this caching will improve performance a lot due to a lot of cross-module name resolution being done unfortunately.