Replies: 9 comments 6 replies
-
First off, you can probably remove the vendored docbook-xsl if you don't use docbook. We've debated splitting that out at the package (wheel) level, although scons-local hadn't come into the discussion. If I were to do this, I'd change the last line of It's pretty hard to figure out which tools are used, since the tool modules themselves just do setup, and many of them are called as part of a default list unless you say otherwise - that is, a lot of tools may get initialized that you never call. You could perhaps instrument the underlying builder class ( |
Beta Was this translation helpful? Give feedback.
-
Sadly (note: that word is a personal editorial comment, not SCons policy!!!), builders don't have a registration method, they're added manually, like: env['BUILDERS']['Program'] = program So you can't trigger on that. The two places I would look at for instrumenting (in the form of "log to a file") would be the |
Beta Was this translation helpful? Give feedback.
-
Will just removing |
Beta Was this translation helpful? Give feedback.
-
docbook should be okay as noted above (should be okay to remove it entirely) - "not finding" a tool is normal (at least for non-default ones). Don't see any point in removing anything else, docbook is 90% of the space consumed by tools. |
Beta Was this translation helpful? Give feedback.
-
Yes, if you know accurately what you're using you can specify just that list, and avoid the defaults. The test suite does this, since it has to kick off scons over 1,000 times, so you'll often see something like: DefaultEnvironment(tools=[])
env = Environment(tools=['gcc','g++','gnulink']) as a recipe to speed up startup. On a larger project, the time to compute dependencies, etc. usually causes startup time to be lost in the noise, and you're not launching SCons numerous times in a short space, but one can use something in the above style if one wants. |
Beta Was this translation helpful? Give feedback.
-
Just remove docbook. That's the biggest piece. |
Beta Was this translation helpful? Give feedback.
-
The only tool initialization which takes significant time is MSVC. The rest are pretty trivial, and in most cases don't launch a subprocess. So to summarize:
That should minimize your footprint (without a lot of extra work to determine which files are safe to remove/aren't used), and minimize your tool initialization time. gcc/g++ do launch gcc to determine version. Likely not a real contributor to SCons start up time.
If there's some other goal you have that won't be addressed by the above, please explain? |
Beta Was this translation helpful? Give feedback.
-
The goal is to add |
Beta Was this translation helpful? Give feedback.
-
Ah... curious if #4127 would be of interest in aid of that goal (that would be one file added, rather than an unpacked tree). Again, the omission of the docbook blob is not an issue that was looked at. I don't think there's been a decision on whether to go this way or not, however. |
Beta Was this translation helpful? Give feedback.
-
To strip down portable SCons installation (
scons-local
) which is now 17Mb because of shipped DocBook, is there a way to see all tools that are used in the hierarchy ofSConstruct
files in my repo?Beta Was this translation helpful? Give feedback.
All reactions