cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

File Size of member revision

kthierer
11-Garnet

File Size of member revision

Without checking out: Is it posssible to find out the file size of a specific member revision via CLI or other means?

(For local differences a sandbox view already offers a file size delta compared to the current member revision.)

     Jürgen

7 REPLIES 7

Hello,

Unfortunately, it's not possible in the scenario you mention (I assume you mean file size in the project repository), since you mention "without checking out".

It had been discussed in the past before, but never came to fruition, as it involved a few differing scenarios (which different customers wanted), and varying performance impacts with each one.

ex.

Scenarios for size of the file that would be displayed:

- the size of the file in the repository (normalized line delimiter and no keywords)

- the size of the file if you were to check it out into your sandbox (depends on line delimiter and keyword expansion)

- the actual size of the file on disk which may be completely unrelated to what is in the repository due to modifications made by the user

Go ahead and post a product idea on the forum here, as it's a valid idea, and I'm sure other customers would vote on it.

Hi Michael

Too bad

For small size revisions it would would be an option to check out to a temporary file with si projectco.

But if the revision is really huge...

I was hoping that under the hood there is a time where file size is transmitted over the network with the

possibility to abort a transaction.

Viewing revisions with web interface sometimes (i guess for file suffixes not registered for the web browser) the file size is displayed in the download dialog.

But maybe the browser fools me having already downloaded the file in the background.

Unfortunately I can not post in the ideas section

Regards

Juergen

Hello Klaus Thierer‌,

I already posted an idea regarding the same scenario. Go ahead to add your comments.

Reagrds,

Sathish

Hi Sathish Kumar Kamaraj

Unfortunately I can not post in the ideas section

Anyhow you could add the link to the idea here if some one stumbles over this thread

BTW:

A side aspect regarding file sizes could also be to have the posibility to filter out

members that exceed a certain size eg. when populating a sandbox or resynchronizing

recursively. You can add that to your idea if you want.

Regards

Jürgen

Hello Jürgen,

I would by interested in your business case. Personally speaken, I would say the file size doesn't matter.

For sure there are requests where the file size matters, for example if you like to restrict checkin operations to small files only, or if you like to list all files in the integrity database with size information, to find out which are the largest.

But whats your business case, please?

In a past life I had to deal with trying to find member sizes for various reasons.

1) To understand what the space requirements would be for a member (and ultimately a sandbox) should someone try to create a sandbox. At that time, sandboxes had the potential to be huge, and having the total size was going to be used to help identify which automated build servers had enough capacity to handle the sandbox create and subsequently build (we used a rough formula to understand the output size vs. sandbox size). Based on build server availability we would either select a target build server with the required space, or generate a new one to build on.

2) We also wanted to look for discrepancies between member sizes relative to the size of change required. For example, if someone were making a code change to alter a color code, we wouldn't expect to see a member difference measured in MB. At the time we had outsourced a considerable amount of work and had internal people accepting the changes as they were sent back. This was an attempt to locate anything that seemed our of line with what was requested so that we would know to look further. Basically, a high level reasonableness check given what was being asked for.

3) Large binary checkins for selected projects could only be performed by certain people. The intent was to inform users before they attempted to check in what their particular size limitation would be for that project.

We were very close to being able to manage the first two cases, but it wasn't an obvious approach. At checkin time, it was possible (and for the life of me I can't remember how I did this) to capture the incoming size of the member somehow, but only after it was received by the server. Once there, I stored the file size as an attribute on the member (checkin-pre trigger). Since revisions didn't/don't support attributes (boo!) I ended up with my own naming convention within the member attributes to store the sizes of each of the revisions. It wasn't pretty, but workable.

For option #3, the trigger approach wouldn't work. The file size wasn't available until after the file had made it to the server. So for scenario #3, we were out of luck for preventing users from sending large files until they had already sent it and paid the price for the network overhead and time. When some of the binary files being checked in measured in 100's of MB, the upload time could be quite significant. We approached this in another way using a subproject structure and permissions, which was tedious but acceptable.

Instead of storing everything with the member, the alternative approach that we had considered was to create a separate database and table for this type of information, and then use triggers to glue everything together. After some consideration, we decided that this would provide too many headaches for backups, DR, overhead in triggers, etc, and thus abandoned the idea. However, from time to time, this does come up when we find that we have data that deserves to be stored elsewhere. With our new approach of offloading trigger work to external servers through web services, this approach could now be much more feasible.

All of this was years ago, and getting harder and harder to recall... Thankfully.

khoppe
14-Alexandrite
(To:kthierer)

Hello,

I raised an idea that could fit to your ones: Showing File size for each member revision

If this idea would be realized, I think then also CLI would be extended.

Thus I invite you to also vote on this idea. I do the same with yours.

 

Klaus

 

Top Tags