-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Slow performance #49
Comments
Which version of NodeJS do you have? |
I checked it under v0.10.x and v4.x (both Ubuntu). I don't know exactly, but I feel 50ms will be good enough |
It runs for 310-390 ms on my MacBook Air / OSX. So I would say it is hard to make it significantly faster. I may try to exclude some modules, but I doubt I can decrease even to 200 ms. If the speed is critical for you I would recommend using either C++ or Go client: NodeJS client goals were different:
|
Agreed with @igorshubovych. It would take a lot of profiling to bring it to ~200ms, not sure it's the top priority unfortunately. But it does raise another question, having a lot of clients is nice for encouraging open-source and having lots of ideas, however it's very odd to have to
Let's have a chat on Gitter about ways we can make this work better. |
Hi, I've created a simple script, which somewhat solved this problem (by acting as caching).
|
@rprieto I personally don't like the concept of multiple clients. I tried some tldr-pages client today. Each one of them was lacking something, or was slow. So instead of 10, I'll prefer a single good client. Like this client has color coding and now with caching I am good to go! |
That's an interesting point: we could provide basic specs expected from clients, such as the ability to color tokens, perform search, caching, work on dark or light backgrounds, and so on. That way we get the benefit of clients specialized on e.g. speed, or working on specific platforms or environments, without losing on the functionality side. |
@VarunAgw you seem to be a smart fella, why don't you have a crack at the node-client and try to make it a bit faster? |
I did a bit of profiling and it seems like the bulk of time is coming from require("request") |
Thanks for that @amitzur! Might be worth checking if we can use raw Just to confirm, if you comment out |
It does take off ~50% on my machine. from 500ms to 250ms on average. There are other things I didn't find that comprise the rest 250ms |
require("unzip2") is also a few dozen ms |
Maybe we can use node-fetch instead of request. |
Please update to 1.4.0. |
Thanks! That's a huge improvement |
I've recently installed this, but I am feeling it is bit slow
I did
time tldr ls
It says:
It will be better if it can work faster. 500ms is bit too high.
The text was updated successfully, but these errors were encountered: