Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove caches #77

Merged
merged 9 commits into from
Aug 25, 2016
Merged

Remove caches #77

merged 9 commits into from
Aug 25, 2016

Conversation

doudou
Copy link
Contributor

@doudou doudou commented Apr 18, 2016

This pull request removes the two main caches that were present, related to orogen loading

  • the XML parsing cache
  • the PkgConfig package cache

It depends on orocos-toolchain/utilrb#30.
rock-core/tools-orocosrb#94 must be applied at the same time, as some private APIs of Loaders::PkgConfig is used by Orocos::Process.

These two caches were meant to work around bad orogen loading behaviour in the pre-loaders days, that is the fact that orogen had a tendency to load the same package over and over again. This has been fixed by the orogen loaders.

Their side effect - and why I remove them - was that we ended up with more than 250k objects in the Ruby heap in a typical Syskit application, that were only related to these - and never used. That's more than 50% of the total.

doudou added 9 commits May 16, 2016 13:17
Base#initialize calls #clear which in turns calls #update already
…kgConfig

The #update method so far was keeping all pkg-config objects, instead
of extracting the (very limited) information it needs and keeping
only that.

This uses an updated Utilrb::PkgConfig class which allows to load
pkg-config files only partially
The real problem is that #update loads everything, which is really optimizing
for the corner case (discovery) versus the common case (loading)

This refactoring makes all loading lazy, and updates the test suite to achieve
a 95%+ coverage.
This is needed for rock-inspect and rock-browse.
@doudou doudou merged commit 139eec6 into master Aug 25, 2016
@doudou doudou deleted the remove_caches branch August 25, 2016 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant