Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
de636f16
Commit
de636f16
authored
Aug 07, 2018
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory savings on diffLine Object
parent
7558a36e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
app/assets/javascripts/diffs/store/mutations.js
app/assets/javascripts/diffs/store/mutations.js
+16
-0
No files found.
app/assets/javascripts/diffs/store/mutations.js
View file @
de636f16
...
...
@@ -18,6 +18,22 @@ export default {
const
diffData
=
convertObjectPropsToCamelCase
(
data
,
{
deep
:
true
});
let
showingLines
=
0
;
diffData
.
diffFiles
.
forEach
(
file
=>
{
if
(
file
.
parallelDiffLines
)
{
file
.
parallelDiffLines
.
forEach
(
line
=>
{
// eslint-disable-next-line no-param-reassign
delete
line
.
text
;
});
}
if
(
file
.
highlightedDiffLines
)
{
file
.
highlightedDiffLines
.
forEach
(
line
=>
{
// eslint-disable-next-line no-param-reassign
if
(
line
.
left
)
delete
line
.
left
.
text
;
// eslint-disable-next-line no-param-reassign
if
(
line
.
right
)
delete
line
.
right
.
text
;
});
}
if
(
file
.
highlightedDiffLines
)
{
showingLines
+=
file
.
parallelDiffLines
.
length
;
Object
.
assign
(
file
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment