Originally on 2012-03-02
The function validate_record_field_positions_global() in bibrecord.py is only used in two places, and both are like:
error = validate_record_field_positions_global(rec)
# FIXME one should write a message here.
This function loops through all record tags and fields thus adding an overhead when adding or deleting fields in the bibrecord structure.
Apart from that, the function does not seem to be correct. It does check the order of the global positions correctly but not the duplication of global positions.
all_fields = 
and never updates that list so the check
if field in all_fields:
does not seem to make sense.
Until the function is given a proper use we could comment out the calls to speed up adding and deleting fields to the bibrecord structure.
Attached patch with calls to validate_record_field_positions_global() commented out.