hledger icon indicating copy to clipboard operation
hledger copied to clipboard

hledger-web sends the whole journal to the browser, every time

Open zarybnicky opened this issue 8 years ago • 4 comments

(I found an old issue on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799442 while searching for hledger-related stuff on Google, and I didn't find it anywhere in Github issue log (open nor closed) so I'm reposting it here. If I did miss it, please close this. Despite this being an old bug report, it seems to me that hledger-web still sends the whole journal on page load.)

Package: hledger-web Version: 0.23.3-1 Severity: wishlist Tags: upstream

Control: found -1 0.24.1-1+b1 0.26-1

hledger-web sends the whole transaction journal to the browser. This is on initial loading as well as after entering each transaction. This is a lot of data, dating back to the start of the financial period. In my case it is a solid 2GB of HTML (9 months). For me this makes hledger-web hardly usable on a weaker or badly connected devices.

It would be nice if only the most recent transactions are loaded by default (a week?) and the older transactions are accessible via paging or "infinite scroll" interface.

Thanks, dam

zarybnicky avatar Jul 20 '17 07:07 zarybnicky

Thanks for reposting! Ouch, that's a lot of data. I agree it would be nice to improve this somehow.

simonmichael avatar Jul 20 '17 07:07 simonmichael

This affects me too, but it's currently only 2 MB for over a year of data. This still causes delays on mobile though. I think the paging / infinite scrolling is a good approach for fixing. Also, I noticed the HTML for each transaction uses a lot more bytes than necessary. Maybe this could be reduced somehow.

AaronM04 avatar Oct 15 '17 19:10 AaronM04

What about using a date query?

amigalemming avatar Jun 08 '19 08:06 amigalemming

See also related discussion at #848.

simonmichael avatar Apr 01 '25 21:04 simonmichael