Skip to content
New issue

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

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

Already on GitHub? # to your account

Slow performance with upgrade to 3.2 #1907

Closed
dmp1ce opened this issue May 16, 2020 · 9 comments
Closed

Slow performance with upgrade to 3.2 #1907

dmp1ce opened this issue May 16, 2020 · 9 comments
Labels
P1 Highest priority
Milestone

Comments

@dmp1ce
Copy link

dmp1ce commented May 16, 2020

From IRC:

I have a "bal not ("[xxx]") command which is quite slow. It takes about 20 seconds when it used to only take less than a second.
I just downgraded to version 3.1.3 on Arch Linux and the same command takes less than 1 second. :/

Other command which do not have the "not" command seem to be performing normally.

I'll work on a way a standard way to reproduce, but I thought it was worth reporting in case anyone else is having an issue.

@jwiegley
Copy link
Member

@dmp1ce Are you able to test if a6a58af is the culprit? That is:

git clone git@github.com:ledger/ledger
cd ledger
git checkout v3.2.0
git revert a6a58af2
mkdir build
./acprep debug
cd build
make
<now use the Ledger that's in this directory>

@jwiegley
Copy link
Member

Also, if you can use print --anon to make an anonymized test case that demonstrate the slow-down, I'd be happy to do the performance analysis here. Git bisect is especially handy at tracking down which commit introduced this regression.

@tbm tbm added the P1 Highest priority label May 16, 2020
@tbm tbm added this to the 3.2.1 milestone May 16, 2020
@tbm
Copy link
Contributor

tbm commented May 16, 2020

@dmp1ce where do you get ledger from? I guess Arch?

Make sure that you're not comparing a ledger 3.1 without debugging enabled and ledger 3.2.0 with debugging.

@dmp1ce
Copy link
Author

dmp1ce commented May 17, 2020

Yeah, I'm using 3.2.0 from pacman official repositories.

@dmp1ce
Copy link
Author

dmp1ce commented May 17, 2020

I'll try out these suggestions tomorrow. Thanks guys!

@jwiegley
Copy link
Member

Great, I'd love to see a fix for this in @tbm 's upcoming release.

@dmp1ce
Copy link
Author

dmp1ce commented May 17, 2020

@jwiegley, I tried with commit reverted and had the following results:

time ./ledger --no-pager -f index.ledger bal
. . . 
real    0m1.747s    
user    0m1.725s
sys     0m0.020s

With version 3.2.0:

ledger --version
Ledger 3.2.0-20200501, the command-line accounting tool

Copyright (c) 2003-2019, John Wiegley.  All rights reserved.

This program is made available under the terms of the BSD Public License.
See LICENSE file included with the distribution for details and disclaimer.

$ time ledger --no-pager -f index.ledger bal
. . .
real    0m31.808s
user    0m31.736s
sys     0m0.030s

@dmp1ce
Copy link
Author

dmp1ce commented May 17, 2020

I tried to use print --anon but it created a file which was processed quickly. I'm trying to figure out how to share my data anonymously but haven't come up with anything yet. I think it has something to do with the number of different account and the number of different currency transactions which look like this:

2020/01/01 Transaction 1
    A:Account:1                                           1.111111111111 STUFF
    A:Account:2                                            -$3

@jwiegley jwiegley reopened this May 17, 2020
@jwiegley
Copy link
Member

Oops, pressed wrong button.

@tbm Let's revert that commit and then we can release. I'll move the behavior that's in that commit under a command-line option, at least until a faster method of commodity comparison can be determined.

@tbm tbm closed this as completed in 7f78cad May 18, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
P1 Highest priority
Projects
None yet
Development

No branches or pull requests

3 participants