elucideye / drishti

Real time eye tracking for embedded and mobile devices.
BSD 3-Clause "New" or "Revised" License
389 stars 82 forks source link

Cellar system: Improve usage of HDD by Hunter #153

Open ruslo opened 7 years ago

ruslo commented 7 years ago

Instead of unpacking cache/source archives to the root directory it's possible to unpack it once and create links instead. This is similar to homebrew.

ruslo commented 7 years ago

Results of my test with android-ndk-r10e-api-19-armeabi-v7a-neon-hid-sections-lto + Release configuration.

Total build time after introducing change in ogles_gpgpu submodule is 34 minutes 55 seconds (cache hit everywhere).

Next timings from build log:

All unpack operations: 10 + 2 + 29 + 110 = 151 sec

I've copied Android SDK cache archive for testing. Extract by tar xf takes the same amount of time (about 110 sec). If instead of creating archive we will use links time will be:

So instead of 110 sec we will have 24.6 sec, i.e. minus 80%.

Expected new timing after this feature introduced will be: 151 x 0.2 = 30.2 sec

In total update of the ogles_gpgpu will cost 30.2 (unpack) + 21 (build) = 51.2 sec

But since we are changing the root directory (config-id changed) we have to update -I/path/to/headers flags and all Drishti binaries will be rebuild even if there is no changes in ogles_gpgpu headers.

Note: LTO is an expensive feature, same toolchain without LTO shows 12 minutes (time for Drishti build only).

ruslo commented 7 years ago

Planning to use Bash script on Linux and OSX for now. For Windows it will remain the same (copy file). CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too.

ruslo commented 7 years ago

https://github.com/ruslo/hunter/releases/tag/v0.19.0

ruslo commented 7 years ago

On my test Boost link takes longer than unpack (it's now 6 sec instead of 2). Android SDK as expected 19 sec.

Real time:

-
Generate: 0:01:12.102801s
Build: 0:11:59.754139s
-
Total: 0:13:11.857547s
-
SUCCESS
ruslo commented 7 years ago

https://github.com/elucideye/drishti/pull/460

ruslo commented 7 years ago

CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too

I forgot about it, reopen :)

headupinclouds commented 7 years ago

Thanks!

ruslo commented 7 years ago

CMake feature: https://gitlab.kitware.com/cmake/cmake/issues/16926 can be used in future, hopefully will work on Windows too

I forgot about it, reopen :)

Waiting for CMake 3.9:

Moving to 0.6 milestone

headupinclouds commented 7 years ago

This seems to be working well for me so far.

headupinclouds commented 7 years ago

https://github.com/ruslo/polly/pull/159

Close?

ruslo commented 7 years ago

Close?

No, the file(LINK ...) feature can only be discussed after 3.9 release. Nothing is implemented at this moment in CMake.

headupinclouds commented 6 years ago

This is a matter of replacing the current internal (opitonal) hunter python scripts with CMake's file(LINK ...) command, right?

ruslo commented 6 years ago

This is a matter of replacing the current internal (opitonal) hunter python scripts with CMake's file(LINK ...) command, right?

Yes