eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

The formatter is too slow #34

Closed lucaswerkmeister closed 9 years ago

lucaswerkmeister commented 10 years ago

Formatting a bigger file can easily take several seconds. I need to investigate what specifically is so slow about the formatter.

lucaswerkmeister commented 10 years ago

Cheap “optimization”: multithreading :D Good when running ceylon run ceylon.formatter source from the command line, but useless in the IDE.

lucaswerkmeister commented 10 years ago

Significantly improved by ceylon/ceylon-sdk#247.

lucaswerkmeister commented 10 years ago

Update: It’s actually pretty good now. ceylon.ast’s RedHatTransformer clocks in at 3144 lines and can be formatted in less than a second from the IDE. I also use a Git pre-push hook in ceylon.ast that formats every touched file, and that typically doesn’t take more than a few seconds (including the Ceylon start-up).

I’m not going to close this issue yet, but it’s much less important now.

lucaswerkmeister commented 9 years ago

Update:

I’m gonna go ahead and call that fast enough. If someone needs better performance I can look into it again (speak up!), but closing for now.