Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
02792054
Commit
02792054
authored
Oct 28, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more memory tweaks
parent
9b1c99e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
crypto/spipe/spipe_test.go
crypto/spipe/spipe_test.go
+3
-1
importer/chunk/splitting.go
importer/chunk/splitting.go
+1
-1
net/conn/conn.go
net/conn/conn.go
+1
-1
No files found.
crypto/spipe/spipe_test.go
View file @
02792054
...
...
@@ -36,9 +36,11 @@ func bindDuplexNoCopy(a, b pipes.Duplex) {
}
}
var
globuf
=
make
([]
byte
,
4
*
1024
*
1024
)
func
bindDuplexWithCopy
(
a
,
b
pipes
.
Duplex
)
{
dup
:=
func
(
byt
[]
byte
)
[]
byte
{
n
:=
make
([]
byte
,
len
(
byt
)
)
n
:=
globuf
[
:
len
(
byt
)
]
copy
(
n
,
byt
)
return
n
}
...
...
importer/chunk/splitting.go
View file @
02792054
...
...
@@ -8,7 +8,7 @@ import (
var
log
=
util
.
Logger
(
"chunk"
)
var
DefaultSplitter
=
&
SizeSplitter
{
Size
:
1024
*
512
}
var
DefaultSplitter
=
&
SizeSplitter
{
Size
:
1024
*
256
}
type
BlockSplitter
interface
{
Split
(
r
io
.
Reader
)
chan
[]
byte
...
...
net/conn/conn.go
View file @
02792054
...
...
@@ -22,7 +22,7 @@ const (
ChanBuffer
=
10
// MaxMessageSize is the size of the largest single message
MaxMessageSize
=
1
<<
2
1
// 4 MB
MaxMessageSize
=
1
<<
2
0
// HandshakeTimeout for when nodes first connect
HandshakeTimeout
=
time
.
Second
*
5
...
...
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