Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
bob
bob.devtools
Commits
4439299b
Commit
4439299b
authored
4 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[dav][upload] increase block size for sha256 computation to improve performance
parent
40f08faf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!210
bdt dav upload automatically adds checksum to filename on remote
Pipeline
#48737
passed
4 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/dav.py
+1
-1
1 addition, 1 deletion
bob/devtools/dav.py
with
1 addition
and
1 deletion
bob/devtools/dav.py
+
1
−
1
View file @
4439299b
...
@@ -57,7 +57,7 @@ def _get_config():
...
@@ -57,7 +57,7 @@ def _get_config():
def
compute_sha256
(
path
):
def
compute_sha256
(
path
):
sha256_hash
=
hashlib
.
sha256
()
sha256_hash
=
hashlib
.
sha256
()
with
open
(
path
,
"
rb
"
)
as
f
:
with
open
(
path
,
"
rb
"
)
as
f
:
for
byte_block
in
iter
(
lambda
:
f
.
read
(
4096
),
b
""
):
for
byte_block
in
iter
(
lambda
:
f
.
read
(
65535
),
b
""
):
sha256_hash
.
update
(
byte_block
)
sha256_hash
.
update
(
byte_block
)
file_hash
=
sha256_hash
.
hexdigest
()
file_hash
=
sha256_hash
.
hexdigest
()
return
file_hash
return
file_hash
...
...
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