Git Product home page Git Product logo

Comments (9)

afh avatar afh commented on June 7, 2024

Not sure what the issue is here. @n4s-linux can you please clarify? Is that ledger by default compiles with debug by default but shouldn't according to you?

from ledger.

n4s-linux avatar n4s-linux commented on June 7, 2024

Hi there. Yes, it turns out that with debug information compared to the optimized binary without debug info - it its 8 times faster.
So by compiling ledger without debugging, we are saving a lot of time.
It may not matter to most users, - but if You grow You book to 20k transactions, You will surely notice - it can take up to 800ms. The same book can be run without debugging in only 100ms.

from ledger.

afh avatar afh commented on June 7, 2024

Could be that changing to the debug build flavor by default was done unintentional.

See https://github.com/ledger/ledger/blob/master/acprep#L234-L235, it seems the codelines date back to e0473e2 when John "[r]ewrote acprep in Python and improved the build".

If you build using ./acprep default is the compiled ledger's speed acceptable for you, @n4s-linux?

from ledger.

n4s-linux avatar n4s-linux commented on June 7, 2024

that builds the slow version for me.
takes 1.138 seconds to run my book (23.4k postings)
whereas the optimized binary will only take 0.174 seconds.

which is ~6.5 times slower than my current binary.

i used acprep opt to get the fast version

from ledger.

afh avatar afh commented on June 7, 2024

After a quick investigation I think the performance improvements are mainly due to acprep setting NO_ASSERTS (which I believe should be DISABLE_ASSERTS as that is the option declared in CMakeLists.txt, which then sets NO_ASSERTS). Generally asserts could be useful in production code, yet the function implementing asserts is called debug_assert (assert is a macro), so its intended use is likely not for production.

from ledger.

afh avatar afh commented on June 7, 2024

To better understand your measurements, @n4s-linux, would you be willing to share how, i.e. with which commands, you measure performance and possible share your anonymised underlying dataset (e.g. ledger print --anon)?

from ledger.

n4s-linux avatar n4s-linux commented on June 7, 2024

Sure thing.
Not sure if the book balances when it puts all the A's in front of the amount, i surely cant run that book
anon.txt

from ledger.

afh avatar afh commented on June 7, 2024

Thanks, @n4s-linux, and to get a better understanding how you measure performance, which commands do you run?

from ledger.

afh avatar afh commented on June 7, 2024

Note to self: Unless ledger is compiled with DISABLE_ASSERTS tracing, which may slow down ledger, is still available (see ledger.hh.in:64)

from ledger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.