Grin: Skip reading commitments in `wallet info`

Created on 18 Aug 2018  路  2Comments  路  Source: mimblewimble/grin

and other places where we don't show outputs.

(Related to https://github.com/mimblewimble/grin/pull/1365) There's an additional db read per output (to get the commitment). It's ok to pay this price in wallet operations where we show outputs, but it also slows down grin wallet info. I time-d it on a wallet with ~1900 outputs:
The current maser

real    0m2.704s
user    0m2.228s
sys     0m0.011s

same code + revert of the commit:

real    0m1.070s
user    0m0.504s
sys     0m0.023s

grin wallet outputs takes the same time, but it doesn鈥檛 feel slow, user has different expectations.

Would be nice to skip commitments reading for ops when we don鈥檛 show outputs.

enhancement help wanted

Most helpful comment

I would like to tackle on this one

All 2 comments

I would like to tackle on this one

I've done some work around this recently (and the DB read is much, much preferable to having to recalculate them). I think we're okay here unless this is identified as a bottleneck on mainnet code

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antiochp picture antiochp  路  3Comments

antiochp picture antiochp  路  7Comments

antiochp picture antiochp  路  3Comments

antiochp picture antiochp  路  3Comments

ignopeverell picture ignopeverell  路  3Comments