Go to file
Augustin Cavalier 906fe09778 libroot_build: Rework path normalization to not rely on system calls.
This path normalization was functionally a recursive lstat(), which
should theoretically be identical to rooting the path in the CWD
and then normalizing the rest of the components after that.

Well, a recursive lstat() is much slower than simple manipulation.
How much slower? Well, on my system, the existing lstat() version
took up a combined total of 63,284,607 us for building haiku.hpkg
(only the package itself, no other components rebuilt), while
this new version uses just 47,901 us -- and this just for a @minimum!

I performed a full @nightly build with both versions in use at once,
with an abort() in place if paths ever did not match, and it
did not fire once. (I even sabotaged the new function just to
ensure that it would actually find differing paths.)

This code was merged in 338b8dc301 (2005),
and has remained largely unchanged since then. I don't know what the
rationale was at the time for using this method instead of this much
simpler version. Perhaps the 3-argument normalize_dir_path was written
first and used more, while this 2-argument version was added later
as a simple shim? But the original commit has no uses of the 3-argument
version aside from the 2-argument one...

Either way, this is an absolutely unbelievable speedup to Haiku builds.
These functions are hit in every I/O operation of all libroot_build
users, and their usages really do add up, as the example above shows.

Fixes #16288.

Change-Id: Ia11f64b0d4106ee62f22741a32ccc0c75c184442
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4427
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-09-06 20:49:37 +00:00
3rdparty Bump vmx files to virtualHW.version = '13' 2021-08-31 16:05:50 +00:00
build LocaleRules: Ignore errors in ExtractCatalogEntries. 2021-09-06 16:45:13 -04:00
data Synchronize translations from the r1beta3 branch 2021-07-21 12:55:45 +01:00
docs Generate developer docs with Sphinx 2021-08-27 11:41:17 +00:00
headers system/uart: refactor debug_uart, fix arm uart 2021-09-06 20:37:14 +00:00
src libroot_build: Rework path normalization to not rely on system calls. 2021-09-06 20:49:37 +00:00
.editorconfig
.gitignore gitignore: Add Visual Studio Code and IntelliJ IDEA configuration directories 2021-05-31 20:15:44 +00:00
.gitreview gerrit: Add .gitreview config 2018-01-04 00:04:02 -06:00
configure configure: Pass -e to JAMSHELL. 2021-09-06 16:02:17 -04:00
Jamfile Translators: Add an AVIF translator 2021-08-27 19:04:28 +00:00
Jamrules Revert "Jamrules: Include the UserBuildConfig before processing repositories." 2019-09-15 17:33:36 +02:00
lgtm.yml lgtm yml: remove buildtools archive after unzip it. 2021-09-03 11:49:54 +00:00
License.md
ReadMe.Compiling.md Update build packages repository 2021-05-14 14:59:19 +00:00
ReadMe.md ReadMe: Add Getting Involved link 2021-06-13 21:06:58 +00:00

Haiku

Homepage | Mailing Lists | IRC Channels | Issue Tracker | API docs

Haiku is an open-source operating system that specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.

Goals

  • Sensible defaults with minimal configuration required.
  • Clean, clear, concise code.
  • Unified desktop environment.

Trying Haiku

Haiku provides pre-built nightly images and release images. Haiku is compatible with a large variety of hardware, but in case you don't want to "take the plunge" and install Haiku on bare metal, you can install it on a virtual machine (VM) instead. If you've never used a VM before, you can follow one of the "Emulating Haiku" guides.

Compiling Haiku

See ReadMe.Compiling.

Contributing

Haiku is a meritocratic open source project with a large variety of tasks. Even if you can't write code, you can still help! Haiku needs designers, (technical) writers, translators, testers... Get involved and help out!

Contributing code

If you're submitting a patch to us, please make sure you're following the patch submitting guidelines.

If you're having trouble finding something in the source tree, you can use one of our web-based source code browsers:

Contributing documentation

The main piece of documentation that still needs work are the API docs (found in the tree at docs/user). Just find an undocumented class, write documentation for it, and submit a patch.

Contributing translations

See wiki:i18n.

Contributing software ports

See HaikuPorts.

Contributing to our infrastructure

See Infrastructure.