View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001151 | Draft | Bug | public | 2013-06-15 13:56 | 2013-07-01 09:36 |
Reporter | wmayer | Assigned To | yorik | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 0.14 | Fixed in Version | 0.14 | ||
Summary | 0001151: Draft and Arch module load Part module at program start | ||||
Description | At startup modules shouldn't load such "heavy" modules like the Part module because this depends on a long list of OCC libs and delays the startup significantly. For both the Part module is loaded by the InitGui.py file. The chain is: InitGui.py > DraftTools > importSVG > DraftGeomUtils > Part | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
Ooh good catch! I had missed that one. Thanks! I'll fix it at once... |
|
Fixed in commit 31fbfd3 May I ask how you discovered? I always have difficulty to follow that kind of import chains and see what imports what and when... |
|
The first step is to make a workbench the default that does not depend on Part, e.g. the Mesh workbench. Then close FreeCAD and set a breakpoint into the function initPart(). Start FreeCAD with the debugger, you will see that it enters this function. The second step is to modify the initPart() function that it raises an exception every time when you want to import it. This way you'll see at startup of FreeCAD which scripts tried to load Part. It appeared to be InitGui.py of Draft and Arch. In order to see how the import chain is you need a Python with debug information. If you go up the stack trace you'll see in the argument of a function (I don't remember its name atm) which module loads Part. Then go again up the stack trace to see which other modules loads the module that loads Part, and so on. I don't know if there is a better way than this. |
|
Thanks for the explanation! |
|
It's fixed! |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-15 13:56 | wmayer | New Issue | |
2013-06-15 13:56 | wmayer | Status | new => assigned |
2013-06-15 13:56 | wmayer | Assigned To | => yorik |
2013-06-15 14:17 | yorik | Note Added: 0003215 | |
2013-06-15 16:35 | yorik | Note Added: 0003216 | |
2013-06-15 17:14 | wmayer | Note Added: 0003217 | |
2013-06-15 18:06 | yorik | Note Added: 0003219 | |
2013-07-01 09:36 | wmayer | Note Added: 0003306 | |
2013-07-01 09:36 | wmayer | Status | assigned => closed |
2013-07-01 09:36 | wmayer | Resolution | open => fixed |
2013-07-01 09:36 | wmayer | Fixed in Version | => 0.14 |