Process Performance Review

| | Comments (0)

Review of the Process class regarding performance.

Me and fabioz did several changes in the code in order to optimize, here is a little summary of changes:

1) Remove cache from Process base class

Since the cache mechanism is not used by several processes we removed it from the base Process class. We have to think about cache in each process specifically.

2) XField Create

We changed the XField.Create implementation to no longer use the list of all derived classes. New each XField must register a factory by calling "RegisterFactory".

The changes affects some xfield constructions, both in Subject and Props classes. Now the construct is more demanding:

{{{

  1. List of tuples
    # Old Code:
    x = [tuple]

# New Code:
x = [xfield.XField( tuple, () )]

  1. List of 2-tuple of ints
    # Old Code: (This actually were a list of GENERIC tuple, not checking for the inner types
    x = [(int,int)]

# New Code:
x = [xfield.XTupleOf( (int,int) )]
}}}

3) Using IEventsManager

The use of interface adapters (IInterface( obj )) must NOT be used in places where performance is required since it is very slow.

???

Categories

Leave a comment