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

 
 

bug #14181: reimplement FileBranch constructor

Submitted by:  Alexander Taler <dissent>
Submitted on:  Wed 17 Aug 2005 04:19:48 PM UTC  
 
Category: NonePriority: 3 - Low
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: NoneFixed Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 22 Sep 2005 12:49:41 AM UTCdissentPriority5 - Normal=>3 - Low

Back to the top


Powered by Savane 3.1-cleanup