Several Bitbucket limitations on file sizes?
Asked by Will Gardner:

I'm an IT manager of a 3 developer team and I've recently stuck my neck out to jump to BitBucket from an older but apparently feature rich open source project (part of Phabricator). I really like the BB interface but I was shocked when my lead developer started complaining about a few features that seem they should be standard in an enterprise level system. It feels like we're going backwards in a few areas.

1. When doing a diff on a branch, it cannot display all files (nor browse to the files) if you have a lot of files to diff.  
2. When doing a diff on a large file, you can't see all diffs  
3. When doing a diff on a large file, you can't browse the entire file  
4. When doing a search in a repo, it will not search large files!

All of these limitations seem very odd. If we upgrade to the paid version will these limits be removed? Or, are these issues going to be addressed or even on a roadmap? Is there an ETA?


Answers:
author: Theodora Boudale
body: Hi Will,

We have the following limits for viewing diffs in Bitbucket Cloud:

* <https://support.atlassian.com/bitbucket-cloud/docs/limits-for-viewing-content-and-diffs/>

These limits apply to all repositories regardless of the billing plan.

I wouldn't recommend using Git LFS for text source code files, as when you use Git LFS for text files you won't be able to view their diff at all.

> 1. When doing a diff on a branch, it cannot display all files (nor browse to the files) if you have a lot of files to diff.

If you are doing a diff on a branch using the **Compare** option from the **Branches** page of a repo, you will run into issues if the diff exceeds the limits mentioned in the doc I shared above. One workaround I can suggest in this case would be to create a pull request, as in pull request settings there is an option to load files individually (this workaround is also mentioned in the doc).

> 2. When doing a diff on a large file, you can't see all diffs  
> 3. When doing a diff on a large file, you can't browse the entire file

Can you please clarify if by 'doing a diff on a large file' you mean the following steps or if you're doing something different?  
- go to the **Source** page of a repo on Bitbucket Cloud website  
- select a file to open it  
- while viewing the file, select the **Source** dropdown from the top left corner and switch to **Diff**

> 4. When doing a search in a repo, it will not search large files

With code search, we index files smaller than 320 KB, so you won't see search results from larger files. This is mentioned in our documentation:

* <https://support.atlassian.com/bitbucket-cloud/docs/search-in-bitbucket-cloud/>

We have a feature request to increase that limit <https://jira.atlassian.com/browse/BCLOUD-16969>, but I'm afraid that it is unlikely to be worked on in the near future. I would suggest leaving a comment on that feature request if you'd be interested in that, as our product managers continue to monitor even closed requests.

Kind regards,  
Theodora

comments: author: Will Gardner
body: Although I'm disappointed in these limitations, I apprecate your very thorough response Theodora.


author: Theodora Boudale
body: You are welcome Will.

We have a feature request to increase the limits for viewing diffs as well, I would suggest adding your vote and your feedback there to further express your interest: <https://jira.atlassian.com/browse/BCLOUD-21868>

Regarding the diff of large files:
> 2. When doing a diff on a large file, you can't see all diffs  
> 3. When doing a diff on a large file, you can't browse the entire file

Please feel free to let me know if you are taking the following steps or if you're doing something different, and I can check with the development team what limit applies to the specific page you are viewing.  
- go to the **Source** page of a repo on Bitbucket Cloud website  
- select a file to open it  
- while viewing the file, select the **Source** dropdown from the top left corner and switch to **Diff**

When you say that you can't see all diffs in this case, do you mean that some diffs are missing from the page? Or is an error displayed instead?

Kind regards,  
Theodora


author: Robert Wen_ReleaseTEAM_
body: Hello [@Will Gardner](/t5/user/viewprofilepage/user-id/4680451) ! I have a question:

You mention impaired performance with large files. Are you using GitLFS for these large files?

comments: author: Will Gardner
body: Robert, thanks for the response! I haven't heard about GitLFS before, so I googled it. I see it says this:

*Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.*

A few initial reactions:

1. I don't think we really incorporate any large (binary?) media items like this in our source code. So would this be necessary for us? We are trying to only search text source code. I guess I can't say for certain that we don't have binary files in our code...?  
2. We are using the cloud version of BitBucket. Wouldn't that already be configured by BitBucket engineers?


author: Robert Wen_ReleaseTEAM_
body: 1. I think there is a problem with Git and large files, regardless of whether they're text or binary because of Git's reliance on xdelta. Here's a Stack Overflow question I found detailing the issue. <https://stackoverflow.com/questions/17888604/git-with-large-files/19494211#19494211>

2. Even though Git LFS is enabled in Bitbucket, you still have to install and configure it on your clients. Here are instructions from Atlassian. <https://support.atlassian.com/bitbucket-cloud/docs/use-git-lfs-with-bitbucket/>


author: Will Gardner
body: Thanks Robert. I will be looking into this. Can you explain to me just on a very top level why I would need to install something on my local git in order to get something to display right on BitBucket's interface? Does installing gitLFS change some git files that get uploaded to BB when you push up?


author: Will Gardner
body: Just to make sure we're talking about the same thing, We're talking about being able to read 300k files. We're not talking about HUGE files.


Tags: bitbucket-cloud

cloud