Uh oh!
There was an error while loading. Please reload this page.
use a Event Cache to replace vec Events in deposit_event - #2228
Conversation
issue 2223 paritytech#2223 suggestion 1 use a map `EventsCache` to replace vec `Events` in `deposit_event`, and flush cache into `Events` on `finalize()`
parity-cla-bot
commented
Apr 8, 2019
It looks like @jkingdom signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
1 similar comment
parity-cla-bot
commented
Apr 8, 2019
It looks like @jkingdom signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
bkchr
commented
Apr 8, 2019
I still think this should be solved in |
atenjin
commented
Apr 8, 2019
Unless provide I think substrate should not open an O(n) storage to users, for users would access it in their way which may cast performance problem just like |
xlc
commented
Apr 8, 2019
I agree with @jkingdom |
bkchr
commented
Apr 8, 2019
I would provide a function
So we will require just one database access for the event data. If we expect database accesses to cost more than allocating space. My solution should be fast than the current presented one. |
atenjin
commented
Apr 9, 2019
this is a nice solution, but it may modify all related interfaces, I think at least related to It may cast a lot of time, at now, we(ChainPool, ChainX) fork substrate to do our changes for this. |
bkchr
commented
Apr 9, 2019
Yeah for |
bkchr
commented
Apr 13, 2019
Just to give an update on this. I have made the changes to parity-codec I described above. In a benchmark I achieve a speedup of factor 366, by using my described method(benchmark is appending 1000 items to a vector like it would be done in substrate). |
bkchr
commented
Apr 16, 2019
Superseded by: #2282 |
issue 2223 #2223
suggestion 1
use a map
EventsCacheto replace vecEventsindeposit_event, and flush cache intoEventsonfinalize()