Replies: 1 comment
-
|
Processing events without collecting is hard to do since events order can go back. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i am reading ra source to get some inspiration, and i am trying to understand Output.
the rustdoc seems to imply it is space-optimized, probably for cache or storage purpose? however, it seems not the case when i dig deeper.
this is use site of Output:
output is produced via
event::process, whose signature isfn process(mut events: Vec<Event>) -> Output, and consumed bybuild_tree(lexed: parser::LexedStr<'_>,parser_output: parser::Output,).processmainly follows forward_parent pointer to resolve in a sequence, hense Output is a forward_parent free Event sequence. however, i am thinking whether we could avoid materializing Output altogether - we could provide a iterator with forward_parent resolution over the original Vec.another clean up is to change Vec to save error and forward_parent pointers in side tables, which will make the parser directly produce Output-like compressed representation with 4 bytes for each event.
is there any specific reason for current design? also, as this change seems doable to me, i'd also like to ask will it probably make performance a little bit better? i haven't done profiling on current baseline though
Beta Was this translation helpful? Give feedback.
All reactions