Python thread for pre-importing modules

前端 未结 4 1542
抹茶落季
抹茶落季 2021-01-13 21:17

I am writing a Python application in the field of scientific computing. Currently, when the user works with the GUI and starts a new physics simulation, the interpreter imme

4条回答
  •  别那么骄傲
    2021-01-13 22:21

    "the user works with the GUI and starts a new physics simulation"

    Not really clear. Does "works with the GUI" means double click? Double click what? Some wxWidgets GUI application? Or IDLE?

    If so, what does "starts a new physics simulation" mean? Click a button somewhere else? A GUI button to bring up a panel where they write code? Or do they import a script they wrote off line?

    Why is the import happening before the simulation starts? How long does a simulation take? What does the GUI show?

    I suspect that there's a way to be much, much lazier in doing the big imports. But from the description, it's hard to determine if there's a point in time where the import doesn't matter as much to the user.

    Threads don't help much. What helps is rethinking the UI experience.

提交回复
热议问题