#2801 closed defect (fixed)
Move includes from Package.h into Package.c to minimize debugging information
Reported by: | Adrian Pop | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | MetaModelica | Version: | trunk |
Keywords: | Cc: | Mahder Alemseged Gebremedhin |
Description (last modified by )
At least on Windows the omc executable has 300-400Mb which is huge
and makes debugging very slow. I suspect this happens because we
include a lot of .h files everywhere.
Currently all the includes are in Package.h and they should be moved into Package.c
Maybe even split Package.h into Package.public.h and Package.private.h and only include the Package.public.h into other .c files and the Package.private.h into Package.c.
Change History (12)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|---|
Summary: | Move includes from Package.h into Package.c → Move includes from Package.h into Package.c to minimize debugging information |
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
You can't remove them because C99 requires function prototypes to be present. Also, even if we suppress warnings, you get wrong results because the implicit arguments will typically use type int and we use long. Etc.
I would move protected declarations into the C file and also make them static functions (so other files cannot link against them).
comment:6 by , 10 years ago
DAE.FUNCTION now has a field SCode.Variability variability
. I did not do anything with it yet.
comment:7 by , 10 years ago
The SimCode now moves protected functions out of the header into the C-file. They are also declared static instead of with external linkage.
comment:10 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Partially fixed in r22149 by moving all the includes from the header files to the source files.
This will also help a lot. Specially for files like ExpressionSimplify.mo. It has 19 public functions and 99 protected functions.
We can also declare only the public functions in Package.h file and put all protected function declarations in the Package.c file (or maybe even not declare them at all and suppress the warnings.)
I think splitting is much cleaner though.