Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
xmlsitemap
Commits
0bd25e4f
Commit
0bd25e4f
authored
Mar 02, 2010
by
Dave Reid
Browse files
by Dave Reid: Transfer files in 16 KB chunks instead of 1 KB. Should be slightly faster.
parent
372ef9ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
xmlsitemap.pages.inc
View file @
0bd25e4f
...
...
@@ -150,11 +150,12 @@ function xmlsitemap_file_transfer($uri, $headers) {
drupal_add_http_header
(
$name
,
$value
);
}
drupal_send_headers
();
$scheme
=
$scheme
=
variable_get
(
'file_default_scheme'
,
'public'
);
// Transfer file in 1
024 byte
chunks to save memory usage.
// Transfer file in 1
6 KB
chunks to save memory usage.
if
(
$scheme
&&
file_stream_wrapper_valid_scheme
(
$scheme
)
&&
$fd
=
fopen
(
$uri
,
'rb'
))
{
while
(
!
feof
(
$fd
))
{
print
fread
(
$fd
,
1024
);
print
fread
(
$fd
,
1024
*
16
);
}
fclose
(
$fd
);
}
...
...
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