Bibrecord: avoid calling validate_record_field_positions_global()
|Reported by:||jmartinm||Owned by:||simko|
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) if error: # FIXME one should write a message here. pass
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.