Hacker News new | past | comments | ask | show | jobs | submit login

It may not feel very clean but one solution for slow imports is to write your own module that imports fast. To give an example: I had a some script whose startup was slowed down by importing numpy for one small (but important) thing.

Replaced it with a 20 line c extension that imported basically instantly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: