Bug #2853

Audit instances of ExpressionList search, add/replace

Added by Mark Miller 6 months ago. Updated about 1 month ago.

Status:New Start:06/23/2017
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:2.13.1
Likelihood:3 - Occasional OS:All
Severity:4 - Crash / Wrong Results Support Group:Any
Found in Version:2.12.1

Description

BTW, preventing duplicate entries in the list is a performance hit, too. To prevent dups, we need to keep list sorted after each and every update or do linear search upon each update. That didn't appeal given the list can grow to 10^4 entries quite easily on dbs with large numbers of vars. In addition, all current consumers of ExpressionList object do work to prevent dups anyways. Well, it looks like all but Volume plot. They all do linear searches of the list contents.

Those places of code should probably be revisted to use newer/faster API. We should probably add a ticket to audit this throughout VisIt. I changed the places I happen to see/encounter but didn't send out an active search party to find all of them ;)

History

Updated by Eric Brugger 6 months ago

  • Status changed from New to Pending
  • Severity changed from 2 - Minor Irritation to 4 - Crash / Wrong Results

We should update ExpressionList so that it is some type of map that eliminates the problem from occurring. In theory this sounds like a performance hit, but since we have duplicated code that searches before adding new entries in several places, this isn't actually the case.

Updated by Mark Miller 6 months ago

Yes, so ExpressionList does nothing to prevent the situation we had in avtVolumeFilter.C where the code was incorrectly adding the same named expressions multiple times. IMHO, that is an incorrect use of the ExpressionList object. In fact, none of VisIt's AttributeGroupVector objects prevent dups and I suspect many are considered invalid if they have dups. So, one way to fix is to enhance the code we generate for AttributeGroupVectors to provide API routines that ensure duplicate entry correctness (at the expense of performance issues mentioned above). Or, to have a feature in such objects that can be enabled and disabled during object contstruction (e.g. the AttributeGroupVector object constructor takes a bool to indicate whether the object should disallow duplicates). But, what would we have done in avtVolumeFilter.C if ExpressionList actually prevented dups? I mean, how would we have known there was a bug there? I suppose we could throw an exception in ExpressionList itself. Do we allow for exceptions in state objects?

Updated by Mark Miller about 1 month ago

  • Target version set to 2.13.1

Updated by Mark Miller about 1 month ago

  • Status changed from Pending to New

Also available in: Atom PDF