Inline a few checks in the add_packet_to_packet_list() function since it's called in tight loop. This will help us to avoid calling functions that simply returns. This is especially the case when we're dealing with the new packet list due to its dissect-on-demand nature where colour/column construction is delayed until the row becomes visible.

svn path=/trunk/; revision=29435
This commit is contained in:
Kovarththanan Rajaratnam 2009-08-15 14:13:36 +00:00
parent aed905a6c9
commit d4ba2208ec
1 changed files with 8 additions and 3 deletions

11
file.c
View File

@ -1090,9 +1090,13 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
col_custom_prime_edt(&edt, cinfo);
#endif
tap_queue_init(&edt);
if (filtering_tap_listeners)
tap_queue_init(&edt);
epan_dissect_run(&edt, pseudo_header, buf, fdata, cinfo);
tap_push_tapped_queue(&edt);
if (filtering_tap_listeners)
tap_push_tapped_queue(&edt);
/* If we have a display filter, apply it if we're refiltering, otherwise
leave the "passed_dfilter" flag alone.
@ -1107,7 +1111,8 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
#ifdef NEW_PACKET_LIST
if (add_to_packet_list) {
epan_dissect_fill_in_columns(&edt, FALSE);
if (cinfo)
epan_dissect_fill_in_columns(&edt, FALSE);
row = new_packet_list_append(cinfo, fdata, &edt.pi);
}
#endif