hamilton icon indicating copy to clipboard operation
hamilton copied to clipboard

[ergonomics] profile driver and base module imports

Open skrawcz opened this issue 1 year ago • 2 comments

Current behavior

It takes ~2 seconds to do:

from hamilton import driver, base

We should profile this and see where the time is being spent.

Library & System Information

Latest hamilton on macOS, python 3.10.

Expected behavior

It should load in < 1 second.

Additional context

This is a quality of life task.

This task requires:

  1. to use a profiler to figure out where time is being spent
  2. report the results
  3. provide recommendations

skrawcz avatar Dec 02 '24 18:12 skrawcz

Blech, pandas gets imported regardless. Second time importing after a fresh install it's faster, but still not great.

First time: image

Second time: image

elijahbenizzy avatar Dec 02 '24 18:12 elijahbenizzy

import pandas as pd

Takes ~1 second for me. So that's not all of the issue.

skrawcz avatar Dec 02 '24 19:12 skrawcz