This repository has been archived by the owner. It is now read-only.

Stream Chunksize #1562

Closed
okonomiyaki3000 opened this Issue Oct 1, 2012 · 4 comments

Comments

Projects
None yet
5 participants
Contributor

okonomiyaki3000 commented Oct 1, 2012

From libraries/joomla/filesystem/file.php, lines 379-380:

        // Beef up the chunk size to a meg
        $stream->set('chunksize', (1024 * 1024 * 1024));

Does anyone else see a problem with this?

Contributor

pasamio commented Oct 1, 2012

one too many 1024's

Contributor

okonomiyaki3000 commented Oct 1, 2012

No, that's not it. 'gig' is misspelled.

Contributor

dongilbert commented Oct 31, 2012

Well, I think what was meant here was what the comment is saying. Since this is regarding writing files using streams, and by default the chunksize is set to 8KB, I think it's reasonable to assume that there are - as @pasamio said - one too many 1024's.

What we really need to do is ask the creator if he meant what he coded, or if he meant what he commented. This chunk of code was added here -

$stream->set('chunksize', (1024 * 1024 * 1024)); // beef up the chunk size to a meg
- by @pasamio. And we already have his vote. So I'll send in a quick fix PR after making sure changing it doesn't break any unit tests.

pasamio added a commit that referenced this issue Oct 31, 2012

Merge pull request #1655 from dongilbert/chunkfix
Incorrect chunksize calculation. Fixes Issue #1562
Contributor

elinw commented Nov 1, 2012

This can be closed

@ianmacl ianmacl closed this Nov 1, 2012

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.