-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support for blackd #23
Comments
Hi @DylanYoung, Thanks for the idea! According to documentation, the main benefit from using
If To achieve similar fast response as with Or am I missing a separate non-performance-related benefit from using |
On the topic of a potential Let's consider a
So the performance benefit would be achieved by just
Compared to
If we were to implement
How does this reasoning sound? |
A lot of code without a valued benefit. |
@Mystic-Mirage Do you use darker in your editor? It takes like 30 seconds to format. |
@akaihola That sounds reasonable to me. Sounds like the implementation of darker complicates things a bit compared to what I was thinking and I was neglecting isort, which necessitates not using blackd (if we also want to save the startup cost of isort). You're correct of course about the startup; I wasn't thinking about the problem right. |
I'm a lucky guy and my darker takes 0.5~1.5 seconds. My IDE calls it on every save. We need to profile darker and find bottlenecks. |
@Mystic-Mirage wrote:
Well, I can appreciate the improved snappiness if we can get e.g. down from 1500 ms to 300 ms response time. And implementing a @DylanYoung wrote:
Even without using Note that in order to use
I haven't checked which IDEs can be configured to do that – do you have any insight on this?
My experience is around 1–2 seconds, similar to @Mystic-Mirage's. How long does Also, please make a copy of the problematic |
I've had issues with my editor, so it's probably not all darker. I can't even get it to run at all right now, lol. I think profiling to start is the way to go. A
You're absolutely right. That's what I meant by second comment. Sorry that wasn't clear. |
@DylanYoung I'd like to change the title of this issue from "Support for blackd" to "Expose darker's functionality as an HTTP API with a |
I'm closing this issue in favor of #59. |
Probably this requires a port argument and not much else after #22 is finished.
Then the arguments just need to be translated into an HTTP request with the appropriate X- headers.
Thoughts?
The text was updated successfully, but these errors were encountered: