Re: ledger.el *very* slow to load account names

2018-04-14 Thread Clément Pit-Claudel
On 2018-04-13 02:49, Alan Schmitt wrote:
>> This patches ledger-accounts-list-in-buffer to use a linear-time
>> deduplication (rather than quadratic).
> 
> Thanks a lot! Completion is now as fast as before.

Thanks for testing; I've pushed the patch.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-14 Thread Clément Pit-Claudel
On 2018-04-13 20:44, John Rakestraw wrote> Thanks for this code, Clément.
> 
> It makes the search for account names *much* faster. However, commit
> 24b43e34dd34de23e54d7ddaa2a147efda6af03d is still better for me. The
> account searches on my ledger are slightly (but only very slightly)
> faster with the earlier commit. But that's minor.  More
> significantly, the current version with your revisions still offers
> me two options for some of my accounts when I reconcile. (Both of the
> accounts listed for my choice are exactly the same -- e.g.,
> "Liabilities:CredCard:JChase".) If I select the first option, it
> tells me that there are no unreconciled postings for that account. If
> I select the second, option, then I get a list of unreconciled
> transactions and can proceed with the reconciliation.
> 
> Second, when I generate a register report with the earlier commit, if
> I put point on a line in the report and hit , I'm taken to
> that entry in the ledger file itself. With the current version (and
> with your code), I can't do that.
> 
> So while your code solves part of my problem (and thanks for that!),
> there's still something else going on.

Thanks for the feedback.  The best at this point would be to open a bug report 
on the ledger-mode tracker, I think :)  (if there's a file you can share that 
demonstrates the problem, it'll be even better).

My hunch is that the second issue might be unrelated.  The first one should be 
straightforward to fix with a repro.

Clément.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-13 Thread John Rakestraw
> On Thursday, April 12, 2018 at 10:52:05 PM UTC-4, Clément Pit-Claudel 
wrote:
> Can you try adding the following to your .emacs? 


Thanks for this code, Clément.

It makes the search for account names *much* faster. However, commit 
24b43e34dd34de23e54d7ddaa2a147efda6af03d is still better for me. The 
account searches on my ledger are slightly (but only very slightly) faster 
with the earlier commit. But that's minor.  More significantly, the current 
version with your revisions still offers me two options for some of my 
accounts when I reconcile. (Both of the accounts listed for my choice are 
exactly the same -- e.g., "Liabilities:CredCard:JChase".) If I select the 
first option, it tells me that there are no unreconciled postings for that 
account. If I select the second, option, then I get a list of unreconciled 
transactions and can proceed with the reconciliation.

Second, when I generate a register report with the earlier commit, if I put 
point on a line in the report and hit , I'm taken to that entry in 
the ledger file itself. With the current version (and with your code), I 
can't do that. 

So while your code solves part of my problem (and thanks for that!), 
there's still something else going on.

--John 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-13 Thread Alan Schmitt
Hello Clément,

On 2018-04-12 22:52, Clément Pit-Claudel  writes:

> Can you try adding the following to your .emacs?
>
> (package-initialize)
> (require 'ledger-mode)
>
> (defun ledger-accounts-deduplicate-sorted (l)
>   "Remove duplicates from a sorted list of strings L."
>   (let ((current l))
> (while (consp current)
>   (if (string= (car current) (cadr current))
>   (setcdr current (cddr current))
> (pop current)))
> l))
>
> (defun ledger-accounts-list-in-buffer ()
>   "Return a list of all known account names in the current buffer as strings.
> Considers both accounts listed in postings and those declared with 
> \"account\" directives."
>   (save-excursion
> (goto-char (point-min))
> (let (results)
>   (while (re-search-forward ledger-account-name-or-directive-regex nil t)
> (setq results (cons (match-string-no-properties 2) results)))
>   (ledger-accounts-deduplicate-sorted
>(sort results #'ledger-string-greaterp)
>
> This patches ledger-accounts-list-in-buffer to use a linear-time
> deduplication (rather than quadratic).

Thanks a lot! Completion is now as fast as before.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-03: 409.46, 2017-03: 407.18

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: ledger.el *very* slow to load account names

2018-04-12 Thread Clément Pit-Claudel
Can you try adding the following to your .emacs?

(package-initialize)
(require 'ledger-mode)

(defun ledger-accounts-deduplicate-sorted (l)
  "Remove duplicates from a sorted list of strings L."
  (let ((current l))
(while (consp current)
  (if (string= (car current) (cadr current))
  (setcdr current (cddr current))
(pop current)))
l))

(defun ledger-accounts-list-in-buffer ()
  "Return a list of all known account names in the current buffer as strings.
Considers both accounts listed in postings and those declared with \"account\" 
directives."
  (save-excursion
(goto-char (point-min))
(let (results)
  (while (re-search-forward ledger-account-name-or-directive-regex nil t)
(setq results (cons (match-string-no-properties 2) results)))
  (ledger-accounts-deduplicate-sorted
   (sort results #'ledger-string-greaterp)

This patches ledger-accounts-list-in-buffer to use a linear-time deduplication 
(rather than quadratic).

Clément.

On 2018-04-12 19:44, John Rakestraw wrote:
> Thanks for this hint, Craig, and thanks for the confirmation that you've 
> observed the same problem, Alan.
> 
> 
> I deleted the elpa version of ledger-mode and cloned the git repo. I don't 
> have time to work with the regex now (especially since my regex-fu is 
> virtually non-existent), but I can confirm that commit 
> 42c48b34bcedf913eb368edf45adbcdf5207e2e3 on Dec 7, 2017 broke ledger-mode in 
> my set-up. 
> 
> 
> I'm happy to work with someone else who knows regex and the code to sort out 
> just what in my account structure is choking the later commits, but for now 
> I'm happy with commit 24b43e34dd34de23e54d7ddaa2a147efda6af03d from last 
> September. You might try that as well, Alan.
> 
> 
> --John
> 
> 
> 
> 
> On Monday, April 9, 2018 at 6:40:34 AM UTC-4, Craig Earls wrote:
> 
> From time to time well intentioned people try to improve the regexs.  I 
> don’t keep up with the latest code any more because my workflow is fine and I 
> am more worried about breaking it than keeping up with new features.  Check 
> to see if there has been a change to the regexs. Several years ago Thierry 
> Bouton was having a similar problem and I spent a few months optimizing them 
> to get them faster.  I necessarily left out some corner case to get a 
> performance improvement. 
> 
> Craig 
> 
> On Mon, Apr 9, 2018 at 03:44 Alan Schmitt  > wrote:
> 
> Hello,
> 
> On 2018-04-07 14:30, John Rakestraw  > writes:
> 
> > - I tab to autocomplete an account name. For example, if I type 
> "Expe" and
> > then hit tab, it takes literally 10 seconds to complete to 
> "Expenses:".
> 
> I have observed the same thing. It changed suddenly from being
> instantaneous to taking a long time a couple months ago.
> 
> Alan
> 
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 
> 406.42
> 
> --
> 
> ---
> You received this message because you are subscribed to the Google 
> Groups "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, 
> send an email to ledger-cli+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> Craig, Corona De Tucson, AZ
> missile_flyout
> enderw88.wordpress.com 
> 
> -- 
> 
> ---
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ledger-cli+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-12 Thread Clément Pit-Claudel
What makes you think regexps are involved?
>From the profile you posted earlier, the culprit (duplicate removal in 
>completion candidates) seems clear.

Clément.

On 2018-04-12 19:44, John Rakestraw wrote:
> Thanks for this hint, Craig, and thanks for the confirmation that you've 
> observed the same problem, Alan.
> 
> 
> I deleted the elpa version of ledger-mode and cloned the git repo. I don't 
> have time to work with the regex now (especially since my regex-fu is 
> virtually non-existent), but I can confirm that commit 
> 42c48b34bcedf913eb368edf45adbcdf5207e2e3 on Dec 7, 2017 broke ledger-mode in 
> my set-up. 
> 
> 
> I'm happy to work with someone else who knows regex and the code to sort out 
> just what in my account structure is choking the later commits, but for now 
> I'm happy with commit 24b43e34dd34de23e54d7ddaa2a147efda6af03d from last 
> September. You might try that as well, Alan.
> 
> 
> --John
> 
> 
> 
> 
> On Monday, April 9, 2018 at 6:40:34 AM UTC-4, Craig Earls wrote:
> 
> From time to time well intentioned people try to improve the regexs.  I 
> don’t keep up with the latest code any more because my workflow is fine and I 
> am more worried about breaking it than keeping up with new features.  Check 
> to see if there has been a change to the regexs. Several years ago Thierry 
> Bouton was having a similar problem and I spent a few months optimizing them 
> to get them faster.  I necessarily left out some corner case to get a 
> performance improvement. 
> 
> Craig 
> 
> On Mon, Apr 9, 2018 at 03:44 Alan Schmitt  > wrote:
> 
> Hello,
> 
> On 2018-04-07 14:30, John Rakestraw  > writes:
> 
> > - I tab to autocomplete an account name. For example, if I type 
> "Expe" and
> > then hit tab, it takes literally 10 seconds to complete to 
> "Expenses:".
> 
> I have observed the same thing. It changed suddenly from being
> instantaneous to taking a long time a couple months ago.
> 
> Alan
> 
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 
> 406.42
> 
> --
> 
> ---
> You received this message because you are subscribed to the Google 
> Groups "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, 
> send an email to ledger-cli+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> Craig, Corona De Tucson, AZ
> missile_flyout
> enderw88.wordpress.com 
> 
> -- 
> 
> ---
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ledger-cli+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-12 Thread John Rakestraw


Thanks for this hint, Craig, and thanks for the confirmation that you've 
observed the same problem, Alan.


I deleted the elpa version of ledger-mode and cloned the git repo. I don't 
have time to work with the regex now (especially since my regex-fu is 
virtually non-existent), but I can confirm that commit 
42c48b34bcedf913eb368edf45adbcdf5207e2e3 on Dec 7, 2017 broke ledger-mode 
in my set-up. 


I'm happy to work with someone else who knows regex and the code to sort 
out just what in my account structure is choking the later commits, but for 
now I'm happy with commit 24b43e34dd34de23e54d7ddaa2a147efda6af03d from 
last September. You might try that as well, Alan.


--John



On Monday, April 9, 2018 at 6:40:34 AM UTC-4, Craig Earls wrote:
>
> From time to time well intentioned people try to improve the regexs.  I 
> don’t keep up with the latest code any more because my workflow is fine and 
> I am more worried about breaking it than keeping up with new features.  
> Check to see if there has been a change to the regexs. Several years ago 
> Thierry Bouton was having a similar problem and I spent a few months 
> optimizing them to get them faster.  I necessarily left out some corner 
> case to get a performance improvement. 
>
> Craig 
>
> On Mon, Apr 9, 2018 at 03:44 Alan Schmitt  > wrote:
>
>> Hello,
>>
>> On 2018-04-07 14:30, John Rakestraw  
>> writes:
>>
>> > - I tab to autocomplete an account name. For example, if I type "Expe" 
>> and
>> > then hit tab, it takes literally 10 seconds to complete to "Expenses:".
>>
>> I have observed the same thing. It changed suddenly from being
>> instantaneous to taking a long time a couple months ago.
>>
>> Alan
>>
>> --
>> OpenPGP Key ID : 040D0A3B4ED2E5C7
>> Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 406.42
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Ledger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ledger-cli+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Craig, Corona De Tucson, AZ
> [image: missile_flyout]
> enderw88.wordpress.com
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-09 Thread Craig Earls
>From time to time well intentioned people try to improve the regexs.  I
don’t keep up with the latest code any more because my workflow is fine and
I am more worried about breaking it than keeping up with new features.
Check to see if there has been a change to the regexs. Several years ago
Thierry Bouton was having a similar problem and I spent a few months
optimizing them to get them faster.  I necessarily left out some corner
case to get a performance improvement.

Craig

On Mon, Apr 9, 2018 at 03:44 Alan Schmitt 
wrote:

> Hello,
>
> On 2018-04-07 14:30, John Rakestraw  writes:
>
> > - I tab to autocomplete an account name. For example, if I type "Expe"
> and
> > then hit tab, it takes literally 10 seconds to complete to "Expenses:".
>
> I have observed the same thing. It changed suddenly from being
> instantaneous to taking a long time a couple months ago.
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 406.42
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Craig, Corona De Tucson, AZ
[image: missile_flyout]
enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-09 Thread Alan Schmitt
Hello,

On 2018-04-07 14:30, John Rakestraw  writes:

> - I tab to autocomplete an account name. For example, if I type "Expe" and 
> then hit tab, it takes literally 10 seconds to complete to "Expenses:".

I have observed the same thing. It changed suddenly from being
instantaneous to taking a long time a couple months ago.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 406.42

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: ledger.el *very* slow to load account names

2018-04-07 Thread Clément Pit-Claudel
On 2018-04-07 18:48, John Rakestraw wrote:
>  - cl-delete-duplicates  1505  47%
>   - cl--delete-duplicates    1505  47%

That function is quadratic, so it's not surprising that it's so slow.  You 
should open a bug report in the ledger-mode repo; it's easy to implement a 
better deduplication.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-07 Thread John Rakestraw
I think this is a clearer example. This profiles a simple tab expansion of 
an account. I type "Expe" and press tab, then wait for this to complete to 
"Expenses:" --

- command-execute2909  91%
 - call-interactively2909  91%
  - funcall-interactively2253  70%
   - ledger-magic-tab1576  49%
- ledger-pcomplete   1576  49%
 - pcomplete-completions 1576  49%
  - ledger-complete-at-point 1574  49%
   - pcomplete--here 1574  49%
- # 1574  49%
 - ledger-accounts-tree  1571  49%
  - ledger-find-accounts-in-buffer   1569  49%
   - apply   1569  49%
- # 1569  49%
 - apply 1569  49%
  - #   1569  49%
   - ledger-accounts-list1568  49%
- ledger-accounts-list-in-buffer 1568  49%
 - cl-delete-duplicates  1505  47%
  - cl--delete-duplicates1505  47%

Again, this latency is a recent change, and i really think that it's a 
problem in my ledger file (or config), but I can't figure out what I've 
done in the file to cause it.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-07 Thread John Rakestraw


On Saturday, April 7, 2018 at 6:15:47 PM UTC-4, Jacob MacDonald wrote:
>
> You should be able to press tab to expand those calls further. If you want 
> to screenshot the profiler I might be able to see something but I'm afraid 
> I'm not super familiar with the Ledger codebase. The profiler is just 
> useful for discovering performance regressions in my experience.
>
>
It does seem that ledger-reconcile and functions called by it are using the 
time. I've pasted a copy of relevant lines below -- not sure that the 
formating will survive, but the list is a tree with each function nested 
and indented under the one immediately above it. This section is followed 
by a call of helm functions that are listed as taking 0%.

   - ledger-reconcile4112  77%
- apply  2420  45%
 - #2420  45%
  - apply2420  45%
   - #  2420  45%
- ledger-read-account-with-prompt2298  43%
 - apply 2298  43%
  - #   2298  43%
   - apply   2298  43%
- # 2298  43%
 - ledger-accounts-list  2136  40%
  - ledger-accounts-list-in-buffer   2136  40%
   - cl-delete-duplicates1997  37%
- cl--delete-duplicates  1994  37%
   cl--position   347   6%
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-07 Thread Jacob MacDonald
You should be able to press tab to expand those calls further. If you want
to screenshot the profiler I might be able to see something but I'm afraid
I'm not super familiar with the Ledger codebase. The profiler is just
useful for discovering performance regressions in my experience.

On Sat, Apr 7, 2018, 17:12 John Rakestraw 
wrote:

>
>
> On Saturday, April 7, 2018 at 5:48:36 PM UTC-4, Jacob MacDonald wrote:
>>
>> I use ledger-mode and it's always instant, albeit with a much smaller
>> input file. Have you used the Emacs profiler to see which functions are
>> taking inordinate time?
>>
>>
> Thanks for this. I've used ledger-mode for ~10 years and until a month or
> two ago my experience mirrored yours -- it's been very quick, even as my
> ledger file has grown. This is a rather sudden change.
>
> I didn't know about the profiler; I just tried it. I think it's reporting
> that ledger-reconcile and ledger-read-account-with-prompt are taking
> considerable time to run. But I'm not at all sure that I'm using the tool
> correctly.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-07 Thread John Rakestraw


On Saturday, April 7, 2018 at 5:48:36 PM UTC-4, Jacob MacDonald wrote:
>
> I use ledger-mode and it's always instant, albeit with a much smaller 
> input file. Have you used the Emacs profiler to see which functions are 
> taking inordinate time?
>
>
Thanks for this. I've used ledger-mode for ~10 years and until a month or 
two ago my experience mirrored yours -- it's been very quick, even as my 
ledger file has grown. This is a rather sudden change.

I didn't know about the profiler; I just tried it. I think it's reporting 
that ledger-reconcile and ledger-read-account-with-prompt are taking 
considerable time to run. But I'm not at all sure that I'm using the tool 
correctly.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el *very* slow to load account names

2018-04-07 Thread Jacob MacDonald
I use ledger-mode and it's always instant, albeit with a much smaller input
file. Have you used the Emacs profiler to see which functions are taking
inordinate time?

On Sat, Apr 7, 2018, 16:30 John Rakestraw 
wrote:

> Hi, folks --
>
> I'm a long-time user of ledger and the ledger.el mode in emacs. For the
> last couple of months (or so) I've found ledger.el to be very, very slow in
> any instance in which it searches for an account name. Two good examples:
>
> - I tab to autocomplete an account name. For example, if I type "Expe" and
> then hit tab, it takes literally 10 seconds to complete to "Expenses:".
>
> - When I execute "ledger-reconcile," I get the same 10-second pause.
>
> Additional data points (apologies if this is too much; I'm not sure
> whether it's relevant or not)
>
>
>- I also use helm-mode (and used helm-mode with ledger-mode for months
>without this issue). When I execute ledger-reconcile with helm-mode
>enabled, I get the same 10-second pause. Then when I key in a unique
>identifier for the account (e.g., creditcardA), it typically presents me
>with two options for that account. If I select the first one, I'm told that
>there are no unreconciled entries for the account, even though I know there
>are. If I select the second one, then I'm given the list of unreconciled
>entries, and I can proceed to reconcile the account. I get this pause
>whether I have helm-mode enabled or not. But the example with helm enabled
>suggests (to me) that for some reason ledger might be scanning another file
>in order to assemble the names for auto-complete.
>- My ledger file is relatively large (~90,000 lines), but this latency
>appeared suddenly.
>- I have several include lines in my ledger file, but I have this
>latency even if I delete these lines.
>- In the last few months I've started using git to manage all of my
>text files. However, I've tried moving my file to a clean directory so that
>(I think) git isn't an issue, and I still have the latency.
>
> I finally found some time today to investigate the problem, but I've been
> unsuccessful. I'm hoping that folks here who know much more about these
> things than I do can at least suggest some things to look for.
>
>
> I'm on a Mac with High Sierra, using emacs 25.3.1, Ledger 3.1.1-20160111,
> and the most recent ledger.el from elpa.
>
>
> Thanks --
>
>
> John
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ledger.el *very* slow to load account names

2018-04-07 Thread John Rakestraw
Hi, folks --

I'm a long-time user of ledger and the ledger.el mode in emacs. For the 
last couple of months (or so) I've found ledger.el to be very, very slow in 
any instance in which it searches for an account name. Two good examples:

- I tab to autocomplete an account name. For example, if I type "Expe" and 
then hit tab, it takes literally 10 seconds to complete to "Expenses:".

- When I execute "ledger-reconcile," I get the same 10-second pause.

Additional data points (apologies if this is too much; I'm not sure whether 
it's relevant or not)


   - I also use helm-mode (and used helm-mode with ledger-mode for months 
   without this issue). When I execute ledger-reconcile with helm-mode 
   enabled, I get the same 10-second pause. Then when I key in a unique 
   identifier for the account (e.g., creditcardA), it typically presents me 
   with two options for that account. If I select the first one, I'm told that 
   there are no unreconciled entries for the account, even though I know there 
   are. If I select the second one, then I'm given the list of unreconciled 
   entries, and I can proceed to reconcile the account. I get this pause 
   whether I have helm-mode enabled or not. But the example with helm enabled 
   suggests (to me) that for some reason ledger might be scanning another file 
   in order to assemble the names for auto-complete.
   - My ledger file is relatively large (~90,000 lines), but this latency 
   appeared suddenly.
   - I have several include lines in my ledger file, but I have this 
   latency even if I delete these lines.
   - In the last few months I've started using git to manage all of my text 
   files. However, I've tried moving my file to a clean directory so that (I 
   think) git isn't an issue, and I still have the latency. 

I finally found some time today to investigate the problem, but I've been 
unsuccessful. I'm hoping that folks here who know much more about these 
things than I do can at least suggest some things to look for.


I'm on a Mac with High Sierra, using emacs 25.3.1, Ledger 3.1.1-20160111, 
and the most recent ledger.el from elpa.


Thanks --


John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.