Skip to content

Startup time is slow #449

Closed
Closed

Description

@rht

I timed each of

import numpy
import quantecon

The numpy import took 0.288s. The quantecon import took 5.007s.
From python -X importtime I found the most time consuming imports are (not exhaustive because the importtime output is too big to parse by eye):
(unit: in ms)

  1. 636 quantecon.arma (mainly scipy.signal)
  2. 2820 quantecon.random
  3. 1121 quantecon.quad (mainly sympy)
  4. 520 quantecon.game_theory
  5. 507 numba

Should quantecon.random and quantecon.quad not be imported at the main namespace?

Activity

  1. oyamad commented on Dec 11, 2018

    @oyamad
    Member

    I found a very interesting and useful package called tuna:

    $ python -X importtime -c 'import quantecon' 2> quantecon.log
    $ tuna quantecon.log
    

    tuna-1

  2. rht commented on Dec 11, 2018

    @rht
    ContributorAuthor

    Indeed; it was painstaking to sift through the raw importtime output.
    From the chart, numba.config takes a significant portion of numba import instead of the portion that loads llvmlite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions