Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Increase default doc chunk size to 384KB #64

Merged
merged 2 commits into from
Apr 11, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SAFARI_PRINT_TIMEOUT_MS = 1000; // Wait 1s before trying to print
const PRINT_DIALOG_TIMEOUT_MS = 500;
const MAX_SCALE = 10.0;
const MIN_SCALE = 0.1;
const DEFAULT_RANGE_REQUEST_CHUNK_SIZE = 262144; // 256KB
const DEFAULT_RANGE_REQUEST_CHUNK_SIZE = 393216; // 384KB
const LARGE_RANGE_REQUEST_CHUNK_SIZE = 1048576; // 1MB
const SHOW_PAGE_NUM_INPUT_CLASS = 'show-page-number-input';
const IS_SAFARI_CLASS = 'is-safari';
Expand Down
6 changes: 3 additions & 3 deletions src/lib/viewers/doc/__tests__/DocBaseViewer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {
});

beforeEach(() => {
fixture.load('viewers/doc/__tests__/DocBase-test.html');
fixture.load('viewers/doc/__tests__/DocBaseViewer-test.html');

containerEl = document.querySelector('.container');
docBase = new DocBaseViewer({
Expand Down Expand Up @@ -954,7 +954,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {

it('should set a default chunk size if no viewer option set and locale is not en-US', () => {
const url = 'url';
const defaultChunkSize = 262144;
const defaultChunkSize = 393216; // 384KB

docBase.options.location = {
locale: 'not-en-US'
Expand All @@ -972,7 +972,7 @@ describe('src/lib/viewers/doc/DocBaseViewer', () => {

it('should set a large chunk size if no viewer option set and locale is en-US', () => {
const url = 'url';
const largeChunkSize = 1048576;
const largeChunkSize = 1048576; // 1MB

docBase.options.location = {
locale: 'en-US'
Expand Down