bugLibCVS Perl Implementation - Bugs: bug #14181, reimplement FileBranch constructor

 
 

bug #14181: reimplement FileBranch constructor

Submitter:  Alexander Taler <dissent>
Submitted:  Wed 17 Aug 2005 04:19:48 PM UTC
   
 
Category:  None Priority:  3 - Low
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Release:  None Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 22 Sep 2005 12:49:41 AM UTC, comment #1: 

In fact, this constructor is called in 3 other classes:

  DirectoryBranch
  RepositoryFile
  WorkingFile

It seems that the way to add extra smarts to this constructor is to change it to accept two arguments, the File object and either a TagSpec or a RevisionNumber.  It would then map from one to the other in order to populate its internal information.  This would have the benefit of maintainin correct internal information, and possibly being able to remove some code.

However, taking a look at the way it is used in DirectoryBranch pretty quickly shows that this would be ineffecient.  It would require additional lookups for each file in get_file_branches(), significantly increasing the cost of this method.  I suspect that similar situations apply to the other cases, they have already got easy access to the information they need, so doing it in the constructor would just make things slower.

Trading performance for a small amount of perceived elegance seems wasteful, so this bug is being deprioritized until it starts to cause problems.


Alexander Taler <dissent>
Group administrator
Wed 17 Aug 2005 04:19:48 PM UTC, original submission:  

There's something wrong with the FileBranch
constructor.

It takes 3 args, but in both places where it's
called one of them is undef.  There is no code in
the constructor.  The solution is to put some
smarts into the FileBranch constructor, and remove
some code from the places where it's called.

Alexander Taler <dissent>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2005-09-22 dissent Priority5 - Normal 3 - Low

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code