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

require("alfy") takes ~120ms #120

Open
carstenschwede opened this issue Jul 14, 2020 · 1 comment
Open

require("alfy") takes ~120ms #120

carstenschwede opened this issue Jul 14, 2020 · 1 comment

Comments

@carstenschwede
Copy link

I noticed that a very simple script of mine (just returning a query from a JSON file) was much slower than expected.
It turns out that just require('alfy') adds about 120ms to a script's execution time.

Since I only used alfy for outputs I replaced

const alfy = require('alfy');

with

const alfy = {
    output: (items) => {
        console.log(JSON.stringify({items}, null, '\t'));
    }
}

Now Alfred feels snappy again. :-)

@wuyuchang
Copy link

I got same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants