Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
3c8b2dbd
Commit
3c8b2dbd
authored
8 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
More efficient OwnedArray deletion for m_memBlocks
parent
45fe834b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Plugins/BinaryWriter/SequentialBlockFile.cpp
+7
-4
7 additions, 4 deletions
Source/Plugins/BinaryWriter/SequentialBlockFile.cpp
with
7 additions
and
4 deletions
Source/Plugins/BinaryWriter/SequentialBlockFile.cpp
+
7
−
4
View file @
3c8b2dbd
...
...
@@ -114,11 +114,14 @@ void SequentialBlockFile::allocateBlocks(uint64 startIndex, int numSamples)
m_currentBlock
.
set
(
i
,
m_currentBlock
[
i
]
-
minBlock
);
}
for
(
int
i
=
0
;
i
<
minBlock
;
i
++
)
{
m_memBlocks
.
removeRange
(
0
,
minBlock
);
//for (int i = 0; i < minBlock; i++)
//{
//Not the most efficient way, as it has to move back all the elements, but it's a simple array of pointers, so it's quick enough
m_memBlocks
.
remove
(
0
);
}
// m_memBlocks.remove(0);
//}
//Look for the last available position and calculate needed space
uint64
lastOffset
=
m_memBlocks
.
getLast
()
->
getOffset
();
uint64
maxAddr
=
lastOffset
+
m_samplesPerBlock
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment