2023-08-08 GnuCash IRC logs

00:26:32 *** jwhite has quit IRC
00:28:25 *** NoobAlice has quit IRC
01:04:31 *** sunyibo has joined #gnucash
01:04:31 *** ChanServ sets mode: +v sunyibo
01:21:29 *** sunyibo has quit IRC
01:24:38 *** fell has quit IRC
01:25:57 *** fell has joined #gnucash
01:25:57 *** ChanServ sets mode: +o fell
02:23:29 *** gandalf has joined #gnucash
03:09:25 *** gjanssens has joined #gnucash
03:09:25 *** ChanServ sets mode: +o gjanssens
03:17:46 *** Paras has joined #gnucash
03:23:16 *** Paras has quit IRC
03:28:40 *** Kaligula has joined #gnucash
03:28:46 *** ChanServ sets mode: +v Kaligula
05:49:21 *** bertbob has quit IRC
05:53:18 *** bertbob has joined #gnucash
05:53:18 *** ChanServ sets mode: +v bertbob
06:08:47 *** chris has joined #gnucash
06:08:47 *** ChanServ sets mode: +v chris
06:08:51 *** gncbot sets mode: +o chris
06:36:45 *** chris has quit IRC
06:48:54 *** warlord has quit IRC
06:54:00 *** Unhammer has quit IRC
07:08:35 *** Unhammer has joined #gnucash
07:30:08 *** chris has joined #gnucash
07:30:08 *** ChanServ sets mode: +v chris
07:30:12 *** gncbot sets mode: +o chris
07:41:22 *** Kaligula has quit IRC
08:27:06 *** jwhite has joined #gnucash
09:05:11 *** chris has quit IRC
09:05:23 *** warlord has joined #gnucash
09:05:23 *** gncbot sets mode: +o warlord
09:32:05 *** ChanServ sets mode: +v jwhite
09:33:58 <jwhite> So I have implemented support for the !Type:Prices entry in qif files. That code is here: https://github.com/Gnucash/gnucash/compare/stable...jwhite66:gnucash:prices1.
09:34:54 <jwhite> Two further things. First, general criticism wacks on patch composition appreciated. Second, on my large, chock full of old data qif file, this adds 4 hours to the import time, due to 70,000 price records.
09:35:43 <jwhite> That does not feel great to me. The slow down is entirely due to the call to gnc-pricedb-add-price: https://github.com/jwhite66/gnucash/blob/prices1/gnucash/import-export/qif-imp/qif-to-gnc.scm#L492
09:36:20 <jwhite> I can imagine implementing an option, default off, to control the price import, and I could also imagine shifting to updating entire price lists. afaict, there is currently no api to update an entire PriceList. Thoughts?
12:11:58 <fell> IMHO csv import would be fine.
13:50:32 <jralls> jwhite, wrap your loop with gnc-pricedb-begin-edit and gnc-pricedb-commit-edit so that you're not committing on every insert.
13:53:31 <jralls> There's no single function to create a whole price list, but there are of course two examples, one in each of libgnucash/backend/sql/gnc-price-sql.cpp and libgnucash/backend/xml/gnc-pricedb-xml-v2.cpp.
14:27:28 *** portot has joined #gnucash
14:29:43 *** portot has quit IRC
14:30:52 *** portot has joined #gnucash
14:42:38 *** portot has quit IRC
14:51:26 *** gandalf has quit IRC
14:52:58 <jwhite> jralls, thanks. don't have hard data, but the wrapping seems to help, but not enough I don't think (i.e. still at least an hour at a guess). I will look at backends, and will compare to speed of csv import.
14:56:07 *** gandalf has joined #gnucash
14:56:08 <jralls> jwhite, 4x improvement seems pretty good to me! ;-)
14:57:38 <jwhite> :-).
14:58:05 <jralls> The CSV code is in gnucash/import-export/csv-imp/gnc-import-price.cpp, but I doubt gjanssens contemplated importing 70K records so it's probably not optimized.
14:58:43 <jralls> A timing comparison will be interesting anyway.
15:02:09 <jwhite> yah. speaking of psychotic test cases, I couldn't find a test case that exercised qif imports. I was thinking of just adding an example qif file for that purpose. Is that sufficient?
15:08:32 *** gandalf has quit IRC
16:02:58 <jralls> There are some unit tests in gnucash/impport-export/qif-imp/test. We very much prefer unit tests to tests that attempt to import a "reference" file.
16:06:05 <jralls> So better to expand those (in particular test-qif-parse.scm) for your new functions.
16:07:21 <jwhite> check. I'm a little concerned that those tests are more suitable for atomic function tests and that the broad import isn't really tested. I'll investigate what I can do.
16:11:02 <jralls> The problem with testing the broad import is that it doesn't produce actionable results: It works or it doesn't, but if it doesn't you have to spend time in the debugger figuring out why. Testing every little piece in turn tells you what's broken.
16:11:43 <jralls> And the smaller the pieces, meaning the shorter and more atomic the functions being tested, the more precisely the failed unit test tells you where to look.
16:12:09 <jwhite> sure, absolutely agree. But you need to have atomic bits you can pull out, and I'm not sure how much of that there is.
16:14:30 <jralls> That's always a problem with old code. The answer is to refactor the overlong functions into short ones and to prise apart dependencies to make ways to isolate what you're testing.
16:15:35 <jralls> There's a whole--rather thick--book on the topic, https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052.
17:24:32 <warlord> jralls, fell -- I needed to update the gnucash-docs builder to copy gnucash-manual instead of gnucash-help. That should take effect tonight.
17:24:55 <jralls> Thanks, warlord.
17:26:31 <fell> Thanks, warlord!
17:31:35 <warlord> I also moved the MASTER and MAINT directories to .old
17:32:01 <warlord> I did NOT remove the "old" gnucash-help files -- but I can do that after the gnucash-manual files show up.
17:32:28 *** warlord has quit IRC
17:33:01 *** warlord has joined #gnucash
17:33:01 *** gncbot sets mode: +o warlord
17:55:17 *** Kaligula has joined #gnucash
17:55:19 *** chf has quit IRC
17:55:26 *** ChanServ sets mode: +v Kaligula
17:55:43 *** chf has joined #gnucash
18:11:11 *** warlord has quit IRC
18:31:00 <Kaligula> \quit
18:31:02 *** Kaligula has quit IRC
19:28:32 *** bertbob has quit IRC
19:30:28 *** NoobAlice has joined #gnucash
19:30:51 *** bertbob has joined #gnucash
19:30:51 *** ChanServ sets mode: +v bertbob
20:47:41 *** chris has joined #gnucash
20:47:41 *** ChanServ sets mode: +v chris
20:47:46 *** gncbot sets mode: +o chris
20:50:21 *** chris has quit IRC
20:55:19 *** chris has joined #gnucash
20:55:19 *** ChanServ sets mode: +v chris
20:55:23 *** gncbot sets mode: +o chris
20:56:21 *** chris has quit IRC
21:07:11 *** bertbob has quit IRC
21:11:16 *** bertbob has joined #gnucash
21:11:16 *** ChanServ sets mode: +v bertbob
22:03:05 *** mosiu has quit IRC