Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fetch the whole text file for the sidebar preview #5954

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Aug 1, 2017

Just fetch the first 10kb. This should be more than enough in 99% of the
cases. And avoid downloading a 10mb text file just to display a tiny
portion.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@mention-bot
Copy link

@rullzer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991 and @MorrisJobke to be potential reviewers.

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

Just fetch the first 10kb. This should be more than enough in 99% of the
cases. And avoid downloading a 10mb text file just to display a tiny
portion.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@codecov
Copy link

codecov bot commented Aug 3, 2017

Codecov Report

Merging #5954 into master will decrease coverage by 0.06%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #5954      +/-   ##
============================================
- Coverage     53.11%   53.05%   -0.07%     
  Complexity    22764    22764              
============================================
  Files          1404     1404              
  Lines         88145    88109      -36     
  Branches       1327     1327              
============================================
- Hits          46819    46747      -72     
- Misses        41326    41362      +36
Impacted Files Coverage Δ Complexity Δ
apps/federation/lib/AppInfo/Application.php 38.59% <0%> (-28.08%) 10% <0%> (ø)
apps/federation/lib/SyncJob.php 22.22% <0%> (-27.78%) 5% <0%> (+2%)
...deration/lib/BackgroundJob/RequestSharedSecret.php 50.74% <0%> (-15.49%) 19% <0%> (+2%)
...s/federation/lib/BackgroundJob/GetSharedSecret.php 49.38% <0%> (-13.96%) 22% <0%> (+3%)
apps/comments/lib/EventHandler.php 79.16% <0%> (-8.34%) 7% <0%> (ø)
lib/private/DB/QueryBuilder/QueryBuilder.php 84.65% <0%> (-3.89%) 62% <0%> (-3%)
...atenotification/lib/Controller/AdminController.php 63.79% <0%> (-2.88%) 11% <0%> (ø)
lib/private/Security/CertificateManager.php 91.08% <0%> (-1%) 39% <0%> (ø)
apps/federation/lib/DbHandler.php 95.86% <0%> (-0.43%) 22% <0%> (ø)
lib/private/legacy/defaults.php 42.99% <0%> (-0.28%) 45% <0%> (+1%)
... and 27 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants