question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

calling cmake from meson is much slower

See original GitHub issue

When using meson from master instead of 0.55.3, meson build --wipe becomes much slower.

On a small/medium size project with multiple subprojects, around 100 targets and a few external commands:

0.55.3

windows : 5.3s linux : 3.3s

master

windows : 13s linux : 4.7s

I’m particularly concerned with the windows evolution.

Running with cProfile I get this top offender

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      436   10.685    0.025   10.685    0.025 {method 'acquire' of '_thread.lock' objects}

while on 0.55.3

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      596    4.284    0.007    4.284    0.007 {method 'acquire' of '_thread.lock' objects}

and pyinstrument shows me that nearly all this time is spent calling cmake (which I use to acquire external dependencies).

A git bisect led me to find this comes from 7e58f33376119b53e01616139ad9354ce9cfe003. Notifying @mensinda

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mensindacommented, Oct 28, 2020

For reference, I have opened https://discourse.cmake.org/t/skipping-cmake-compiler-checks/2079 to figure out a proper soultion.

0reactions
Sahnvourcommented, Nov 1, 2020

@mensinda Tested your suggestion, it’s faster at ~7s with no generator instead of ~10s (my first measurement at 13s was a bit high, maybe cold filesystem or something).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Meson really faster than CMake? : r/programming
The article compares both CMake and Meson using the Ninja backends. In fact, the ninja step was a little faster for him on...
Read more >
FAQ
Why is there not a Make backend? Because Make is slow. This is not an implementation issue, Make simply can not be made...
Read more >
Skipping CMake compiler checks - Usage
The problem is that CMake invokes the compiler for each dependency multiple times to gather data. This is naturally fine for configuring a...
Read more >
More Modern CMake - GitHub Pages
You should pick a tool on your first CMake call in a directory, just like the compiler. Feel free to have several build...
Read more >
Using via meson — NumPy v1.24 Manual
We will need the generated C wrapper before we can use a general purpose build system like meson . We will acquire this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found