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

Slow startup time #52

Open
Jameskmonger opened this issue Nov 1, 2018 · 1 comment
Open

Slow startup time #52

Jameskmonger opened this issue Nov 1, 2018 · 1 comment

Comments

@Jameskmonger
Copy link
Contributor

Jameskmonger commented Nov 1, 2018

I did some profiling to see which require calls were taking the longest

twotime:index.js -> 305ms for inquirer
twotime:index.js -> 3ms for commander
    twotime:api-provider.js -> 25ms for configstore
                harvest:client.js -> 6ms for async
                    request-promise:rp.js -> 99ms for bluebird
                    request-promise:rp.js -> 10ms for request-promise-core/configure/request2
                    request-promise:rp.js -> 3ms for stealthy-require
                    request-promise:rp.js -> 14ms for tough-cookie
                    request-promise:rp.js -> 212ms for request
                harvest:client.js -> 356ms for request-promise
            harvest:index.js -> 362ms for client
            harvest:index.js -> 0ms for api/clients
            harvest:index.js -> 1ms for api/company
            harvest:index.js -> 1ms for api/contacts
            harvest:index.js -> 1ms for api/estimateItemCategories
            harvest:index.js -> 1ms for api/estimateMessages
            harvest:index.js -> 1ms for api/estimates
            harvest:index.js -> 1ms for api/expenseCategories
            harvest:index.js -> 0ms for api/expenses
            harvest:index.js -> 1ms for api/invoiceItemCategories
            harvest:index.js -> 0ms for api/invoiceMessages
            harvest:index.js -> 2ms for api/invoicePayments
            harvest:index.js -> 1ms for api/invoices
            harvest:index.js -> 1ms for api/projectAssignments
            harvest:index.js -> 1ms for api/projects
            harvest:index.js -> 1ms for api/roles
            harvest:index.js -> 2ms for api/taskAssignments
            harvest:index.js -> 1ms for api/tasks
            harvest:index.js -> 1ms for api/timeEntries
            harvest:index.js -> 1ms for api/userAssignments
            harvest:index.js -> 0ms for api/users
        twotime:harvest/api.js -> 390ms for harvest
        twotime:harvest/api.js -> 81ms for parse-notes
    twotime:api-provider.js -> 473ms for harvest/api
    twotime:api-provider.js -> 19ms for targetprocess-rest-api
twotime:index.js -> 559ms for api-provider

Each log is from after the require call, logging how long it took

@Jameskmonger
Copy link
Contributor Author

cc @davidgruar

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

1 participant