Comments (8)
Yes, would be nice to improve the startup performance, but we're kinda limited by general Node.js and require performance...
What Node.js version? Do you mean the interactive UI $ fkill
or non-interactive (with arguments) $ fkill foo
?
from fkill-cli.
I added time-require
to see what require's take up the most time at startup:
Start time: (2018-12-25 19:50:35 UTC) [treshold=1%]
# module time %
1 chalk (node_modules/time-require/node_modules/chalk/index.js) 7ms ▇ 1%
2 locate-path (node_modules/locate-path/index.js) 6ms ▇ 1%
3 find-up (node_modules/find-up/index.js) 8ms ▇ 1%
4 graceful-fs (node_modules/graceful-fs/graceful-fs.js) 7ms ▇ 1%
5 load-json-file (node_modules/load-json-file/index.js) 15ms ▇▇ 3%
6 read-pkg (node_modules/read-pkg/index.js) 18ms ▇▇▇ 3%
7 read-pkg-up (node_modules/read-pkg-up/index.js) 27ms ▇▇▇▇ 5%
8 loud-rejection (node_modules/loud-rejection/index.js) 6ms ▇ 1%
9 validate-npm-package-license (node...ate-npm-package-license/index.js) 9ms ▇▇ 2%
10 ./fixer (node_modules/normalize-package-data/lib/fixer.js) 21ms ▇▇▇ 4%
11 normalize-package-data (node_modul...ze-package-data/lib/normalize.js) 24ms ▇▇▇ 4%
12 meow (node_modules/meow/index.js) 71ms ▇▇▇▇▇▇▇▇▇ 12%
13 ./lib/parse (node_modules/cross-spawn-async/lib/parse.js) 10ms ▇▇ 2%
14 cross-spawn-async (node_modules/cross-spawn-async/index.js) 11ms ▇▇ 2%
15 execa (node_modules/taskkill/node_modules/execa/index.js) 18ms ▇▇▇ 3%
16 taskkill (node_modules/taskkill/index.js) 20ms ▇▇▇ 3%
17 ./lib/parse (node_modules/cross-spawn/lib/parse.js) 11ms ▇▇ 2%
18 cross-spawn (node_modules/cross-spawn/index.js) 14ms ▇▇ 2%
19 execa (node_modules/fkill/node_modules/execa/index.js) 22ms ▇▇▇ 4%
20 cross-spawn (node_modules/pid-from...ode_modules/cross-spawn/index.js) 6ms ▇ 1%
21 execa (node_modules/pid-from-port/node_modules/execa/index.js) 10ms ▇▇ 2%
22 pid-from-port (node_modules/pid-from-port/index.js) 11ms ▇▇ 2%
23 ./lib/_stream_readable.js (node_mo...e-stream/lib/_stream_readable.js) 9ms ▇▇ 2%
24 readable-stream (node_modules/readable-stream/readable.js) 14ms ▇▇ 2%
25 from2 (node_modules/from2/index.js) 15ms ▇▇ 3%
26 into-stream (node_modules/into-stream/index.js) 16ms ▇▇ 3%
27 csv-parser (node_modules/csv-parser/index.js) 9ms ▇▇ 2%
28 neat-csv (node_modules/neat-csv/index.js) 29ms ▇▇▇▇ 5%
29 tasklist (node_modules/tasklist/index.js) 32ms ▇▇▇▇ 5%
30 ps-list (node_modules/process-exists/node_modules/ps-list/index.js) 34ms ▇▇▇▇ 6%
31 process-exists (node_modules/process-exists/index.js) 36ms ▇▇▇▇▇ 6%
32 fkill (node_modules/fkill/index.js) 94ms ▇▇▇▇▇▇▇▇▇▇▇ 16%
33 color-convert (node_modules/color-convert/index.js) 7ms ▇ 1%
34 ansi-styles (node_modules/ansi-styles/index.js) 9ms ▇▇ 2%
35 chalk (node_modules/chalk/index.js) 16ms ▇▇ 3%
36 lodash (node_modules/lodash/lodash.js) 20ms ▇▇▇ 3%
37 ./baseUI (node_modules/inquirer/lib/ui/baseUI.js) 23ms ▇▇▇ 4%
38 ./ui/bottom-bar (node_modules/inquirer/lib/ui/bottom-bar.js) 28ms ▇▇▇▇ 5%
39 ../Subscriber (node_modules/rxjs/internal/Subscriber.js) 9ms ▇▇ 2%
40 ./util/canReportError (node_module.../internal/util/canReportError.js) 10ms ▇▇ 2%
41 ./internal/Observable (node_modules/rxjs/internal/Observable.js) 14ms ▇▇ 2%
42 ./internal/observable/ConnectableO...ervable/ConnectableObservable.js) 6ms ▇ 1%
43 ./scheduler/queue (node_modules/rxjs/internal/scheduler/queue.js) 6ms ▇ 1%
44 ./operators/observeOn (node_module.../internal/operators/observeOn.js) 8ms ▇ 1%
45 ./internal/ReplaySubject (node_mod...s/rxjs/internal/ReplaySubject.js) 15ms ▇▇ 3%
46 ../util/subscribeToResult (node_mo...ternal/util/subscribeToResult.js) 7ms ▇ 1%
47 ./internal/observable/combineLates...rnal/observable/combineLatest.js) 10ms ▇▇ 2%
48 ./from (node_modules/rxjs/internal/observable/from.js) 6ms ▇ 1%
49 ./internal/observable/concat (node...js/internal/observable/concat.js) 9ms ▇▇ 2%
50 rxjs (node_modules/rxjs/index.js) 88ms ▇▇▇▇▇▇▇▇▇▇▇ 15%
51 rxjs/operators (node_modules/rxjs/operators/index.js) 98ms ▇▇▇▇▇▇▇▇▇▇▇▇ 16%
52 ./ui/prompt (node_modules/inquirer/lib/ui/prompt.js) 190ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 32%
53 ../utils/screen-manager (node_modu...irer/lib/utils/screen-manager.js) 9ms ▇▇ 2%
54 ./base (node_modules/inquirer/lib/prompts/base.js) 12ms ▇▇ 2%
55 ./prompts/list (node_modules/inquirer/lib/prompts/list.js) 20ms ▇▇▇ 3%
56 chardet (node_modules/chardet/index.js) 10ms ▇▇ 2%
57 iconv-lite (node_modules/iconv-lite/lib/index.js) 6ms ▇ 1%
58 tmp (node_modules/tmp/lib/tmp.js) 7ms ▇ 1%
59 external-editor (node_modules/external-editor/main/index.js) 29ms ▇▇▇▇ 5%
60 ./prompts/editor (node_modules/inquirer/lib/prompts/editor.js) 30ms ▇▇▇▇ 5%
61 inquirer (node_modules/inquirer/lib/inquirer.js) 277ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 46%
Total require(): 1059
Total time: 599ms
from fkill-cli.
Could also consider using ncc
.
from fkill-cli.
Help welcome with this :)
from fkill-cli.
On latest 10 node, cli with arguments. What about redusing unnecessary requires at start and do only when needed?
from fkill-cli.
Yeah, we could move the interactive UI stuff to a separate file and only initiate it when there are no CLI arguments.
from fkill-cli.
@IssueHunt has funded $20.00 to this issue. See it on IssueHunt
from fkill-cli.
@sindresorhus has rewarded $18.00 to @stroncium. See it on IssueHunt
- 💰 Total deposit: $20.00
- 🎉 Repository reward(0%): $0.00
- 🔧 Service fee(10%): $2.00
from fkill-cli.
Related Issues (20)
- Tomcat process not getting listed HOT 2
- Cannot install on Ubuntu HOT 1
- Warning during installation concerning cross-spawn-async
- Feature: Show CPU/mem usage HOT 5
- Combining --force and --silent HOT 7
- Include more lines in the list of processes HOT 1
- v6.0.0 interactive mode not launching on Windows HOT 1
- Cheatsheet for fkill added to the cheat library
- Warning of unmet peer dependency: inquirer
- [improvement] line softwrap when it's too long
- SyntaxError: Invalid regular expression HOT 1
- fkill crashes on Node v8.17.0 HOT 1
- Process list not displaying application names HOT 4
- Cannot search by port in fkill --verbose mode
- fkill doesn't search application list properly HOT 4
- 'npx fkill' should be working!!! HOT 1
- Search doesn't find process HOT 2
- please support APPimage format HOT 1
- bug/feature request(windows): console output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fkill-cli.