mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
FileAnalysis: optimize get_file_handle event queueing.
When a file handle is needed and the last event in the queue is also a get_file_handle event with the same arguments, instead of queueing a new event, just remember to cache/re-use the resulting handle from the previous event. This depends on get_file_handle handlers not changing global state that is also used to derive the file handle string.
This commit is contained in:
parent
390358b70c
commit
fc267d010d
10 changed files with 88 additions and 37 deletions
|
@ -18,11 +18,11 @@ export {
|
|||
if ( ! c?$http ) return "";
|
||||
|
||||
if ( c$http$range_request )
|
||||
return fmt("%s %s %s %s", ANALYZER_HTTP, is_orig, c$id$orig_h,
|
||||
build_url(c$http));
|
||||
return cat(ANALYZER_HTTP, " ", is_orig, " ", c$id$orig_h,
|
||||
" ", build_url(c$http));
|
||||
|
||||
return fmt("%s %s %s %s %s", ANALYZER_HTTP, c$start_time, is_orig,
|
||||
c$http$trans_depth, id_string(c$id));
|
||||
return cat(ANALYZER_HTTP, " ", c$start_time, " ", is_orig,
|
||||
" ", c$http$trans_depth, " ", id_string(c$id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue