Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing is slow when worksheet contains huge mixin composition #186

Open
Blaisorblade opened this issue Jul 5, 2014 · 2 comments
Open

Typing is slow when worksheet contains huge mixin composition #186

Blaisorblade opened this issue Jul 5, 2014 · 2 comments
Labels

Comments

@Blaisorblade
Copy link

Typing in the worksheet (with Scala-IDE 3.0.3) is painfully slow for me — as in, slower than typing over SSH. It was not like this, but I can't pin down when this changed.
Might be related to #112, but I can't really tell.

@Blaisorblade
Copy link
Author

Aaah, figured it out!
The worksheet in question contains a line composing almost all mixins for my whole project together.

Moving that line to a method in a separate trait (EDIT: done in inc-lc/ilc-scala@10beab8) makes things much faster — both typing and evaluation of subsequent lines.

It seems more plausible that #112 is involved.

@Blaisorblade Blaisorblade changed the title Typing is slow Typing is slow when worksheet contains huge mixin composition Jul 9, 2014
Blaisorblade added a commit to inc-lc/ilc-scala that referenced this issue Jul 9, 2014
Mixin compositions take long to compile, and apparently that slows down
operating with the worksheets - see scala-ide/scala-worksheet#186.
@dragos
Copy link
Member

dragos commented Jul 28, 2014

This is most likely a performance problem in the type-checker, and your workaround is a good solution. Another few options:

  • add an explicit type to val v =. I believe the type-checker builds a complicated refinement type for that val, every time you type
  • upgrade to Scala 2.11.1+, where we have several improvements to the type-checker.

@dragos dragos added the editor label Jul 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants