cstroe / svndumpapi

A Java library for manipulating a Subversion dump file.
GNU Affero General Public License v3.0
5 stars 1 forks source link

Make SvnPropertyChange more efficient #46

Open cstroe opened 8 years ago

cstroe commented 8 years ago

Right now, SvnPropertyChange will accept a name matcher and a value transform function. The transform function will transform the property value if the name of the property matches the criteria.

In order to match on another property name, you have to create a new SvnPropertyChange consumer. The problem with this is that the SvnPropertyChange consumer rebuilds every properties map in the SvnDump object.

To do that once each time you add a new SvnPropertyChange seems very inefficient. We can just give SvnPropertyChange a list of (name matcher, value transformer) pairs and it will only need to rebuild the properties map once.