Opened 14 years ago

Closed 14 years ago

#249 closed task (fixed)


Reported by: Peter Johansson Owned by: Peter Johansson
Priority: major Milestone: svndigest 0.7
Component: core Version: trunk
Keywords: Cc:


SVNlog's in internally containing vectors of authors, dates etc. This means that is trivial to get a these vectors (as const&). However, the design seems less optimal when iterating through the log. One has to keep all four vectors and iterating through every one of them. For this it seems tempting to change internal representation to a vector<Commitment>, i.e., transposing the representation to talk matrix language. The drawback is, of course that the functions such as date() author() that currently return const& have to be reimplemented introducing a lot of copying. If this was crucial the copying could be avoided using some kind of view-class just like one often has vector as a view into a matrix. That would be too much work here, I think. However, the present implementation is not good enough.

Therefore I propose that we either

1) Transpose the representation as discussed above or

2) Implement an iterator class that looks like a Commitment*, operator++ should iterate to next Commitment in log. Perhaps also have a reversed iterator.

Change History (2)

comment:1 Changed 14 years ago by Peter Johansson

Milestone: 0.80.7
Owner: changed from Jari Häkkinen to Peter Johansson
Status: newassigned
Summary: redesign SVNlogSVNlog::iterator

Well, I guess I'll go for number 2...

comment:2 Changed 14 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

in [448]

Note: See TracTickets for help on using tickets.