Hi,

Here are my stats:

Type         Num Entries
-----------  -----------
Transaction        13071
Price                297
Open                 181
Close                  1
~Total~            13550
-----------  -----------


This is on a MacBook Pro late 2013


$ time bean-check lk.beancount

real 0m4.430s
user 0m4.148s
sys 0m0.134s

This is about the same as I have it in Ledger (still maintaining backwards
compatibility via some includes):

$ time ledger -f lk.ledger bal
real 0m4.383s
user 0m4.291s
sys 0m0.066s

I don't know if it's because Ledger has a lot more overhead because of what
it does, but by this stupid comparison, I don't really see a good reason to
rewrite parts of Beancount in C/C++. I think it's much better to have more
features and wait a little more for generating reports, instead of spending
time in porting to C.


I also have a script that is based on the "net worth over time" beancount
script (but does a lot more custom reporting) which is able to process my
journal in ~40 seconds. This is much better than the ~2 minute times I saw
for the same thing with Ledger.

Regards,
Metin


On Sun, Aug 20, 2017 at 10:17 PM, Jason Chu <[email protected]> wrote:

> I'm a fan of the readability/maintainability relative to straight C. It is
> also possible to commit the C output so that cython is only a development
> dependency and building just needs the current deps.
>
> I think of it less like a custom syntax and more of a syntax
> augmentation.  All of the cython features I've used can be translated back
> to straight python very easily.
>
> On Sun, Aug 20, 2017 at 11:47 AM Martin Blais <[email protected]> wrote:
>
>> Never tried.
>> Not a fan of custom syntax, but if it helps you prototype speed
>> improvements +1. We could then make a final C translation.
>>
>>
>> On Sun, Aug 20, 2017 at 2:21 PM, Jason Chu <[email protected]> wrote:
>>
>>> Have there been any tests with cython? I've had great results converting
>>> methods into c functions with type annotations. Would it be worth the
>>> additional dependency? Or possibly we could make it an optional dependency
>>> if done properly.
>>>
>>> On Sun, Aug 20, 2017, 10:35 AM Matthew S. Harris <[email protected]>
>>> wrote:
>>>
>>>> On Wed, Aug 16, 2017 at 10:06 PM Martin Blais <[email protected]> wrote:
>>>>
>>>>> and how long does Beancount take to parse them?
>>>>>
>>>>
>>>> $ time bean-check finances.beancount
>>>> real 0m16.947s
>>>> user 0m16.393s
>>>> sys 0m0.305s
>>>>
>>>> $ time bean-check finances.beancount
>>>> real 0m1.494s
>>>> user 0m1.304s
>>>> sys 0m0.135s
>>>>
>>>>
>>>>> On one of those:
>>>>>  https://www.intel.com/content/www/us/en/products/
>>>>> boards-kits/nuc/kits/nuc6i5syh.html
>>>>> with 32Gb of RAM running Linux.
>>>>> (It's basically a souped-up laptop in a small box.)
>>>>>
>>>>
>>>> Ah, I'm going to consider getting one of those. Looks nice!
>>>>
>>>>
>>>>> I suspect most of that 30 secs is rendering time.
>>>>> Try running this:
>>>>>
>>>>> $ time bean-check -v $L
>>>>>
>>>>
>>>> $ time bean-check -v finances.beancount
>>>> INFO : Operation: 'beancount.parser.parser.parse_file' Time: 1635 ms
>>>> INFO : Operation: 'beancount.parser.parser' Time: 1635 ms
>>>> INFO : Operation: 'beancount.ops.pad' Time: 279 ms
>>>> INFO : Operation: 'beancount.ops.documents' Time: 33 ms
>>>> INFO : Operation: 'beancount.plugins.implicit_prices' Time: 585 ms
>>>> INFO : Operation: 'beancount.plugins.unrealized' Time: 703 ms
>>>> INFO : Operation: 'beancount.plugins.tag_pending' Time: 17 ms
>>>> INFO : Operation: 'beancount.plugins.check_commodity' Time: 64 ms
>>>> INFO : Operation: 'beancount.ops.balance' Time: 800 ms
>>>> INFO : Operation: 'function: validate_open_close' Time: 11 ms
>>>> INFO : Operation: 'function: validate_active_accounts' Time: 68 ms
>>>> INFO : Operation: 'function: validate_currency_constraints' Time: 48 ms
>>>> INFO : Operation: 'function: validate_duplicate_balances' Time: 7 ms
>>>> INFO : Operation: 'function: validate_duplicate_commodities' Time: 7
>>>> ms
>>>> INFO : Operation: 'function: validate_documents_paths' Time: 4 ms
>>>> INFO : Operation: 'function: validate_check_transaction_balances'
>>>> Time: 676 ms
>>>> INFO : Operation: 'function: validate_data_types' Time: 186 ms
>>>> INFO : Operation: 'beancount.ops.validate' Time: 1009 ms
>>>>
>>>> Looks like my times are about twice yours.
>>>>
>>>> I sort-of live with it (I mostly use the SQL commands now), but I'd be
>>>>> lying if I said it doesn't annoy me.
>>>>> Used to be snappy and fast, I think beyond 2secs it starts to annoy me.
>>>>> I'm in a similar situation as you... getting annoyed, but not enough
>>>>> to actually do anything about it yet.
>>>>>
>>>>
>>>> Looks like you've had the same ideas and many more, and it just hasn't
>>>> been worth fixing yet.
>>>>
>>>>
>>>> Matthew
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Beancount" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/beancount/CALo5b9Lt-HE%2BnXst016yjuN8uH9KqcQgpNfumKfd
>>>> Dq%3DW6WhGcA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/beancount/CALo5b9Lt-HE%2BnXst016yjuN8uH9KqcQgpNfumKfdDq%3DW6WhGcA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>>
>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/beancount/CAFFHUgtc_aj5dZ5TXUEJOuipY13dzCn8GVNjL7F
>>> LoaS5P5zfjw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/beancount/CAFFHUgtc_aj5dZ5TXUEJOuipY13dzCn8GVNjL7FLoaS5P5zfjw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/beancount/CAK21%2BhP2oudoZL-tsW8h34hbXKf0xA9SNu1aaG4NrvZyo
>> cHFFg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhP2oudoZL-tsW8h34hbXKf0xA9SNu1aaG4NrvZyocHFFg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/CAFFHUgsTib1MnEDRxEJwr8EmAz2ke
> QJoR-geW-t1jZ8MSHHCuw%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAFFHUgsTib1MnEDRxEJwr8EmAz2keQJoR-geW-t1jZ8MSHHCuw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAEk80b%3DZzmX_1RgE3oJ8SdL6d9no%3DP7VQQsVjk9tPCTfxOAA3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to