Hi,
in r45669 I added two new functions: epan_dissect_reset, proto_tree_reset.
In BTS we have got bug #2047[1] which is something simillar, but:
1/ IMHO it has minimal impact for speed, and this functions duplicates some code.
2/ major thing for me was to make referencing (HF_REF_TYPE_DIRECT),
and unreferencing (HF_REF_TYPE_NONE) hfinfo->ref_type multi-thread dissection safe.
But achieving #2 can be done with some simpler code, rename
dfilter_prime_proto_tree to dfilter_prime() + remove tree argument,
and use new function after compiling dfilter and *before* dissection loops.
Create new function dfilter_unprime() which unreference hfs, and call
this funcion *after* dissection loop.
last point, r45669 is buggy, it never set hfi->ref_type back to HF_REF_TYPE_NONE.
So, I'll probably revert r45669, and fix it like I described above,
I can prepare patch if anyone want to do review?
Dunno what to do with bug #2047 WONTFIX? Anders?
[1] https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2047