Comments (9)
Not sure how you create and insert the dom into view right now. But if its not done in bulk, do that instead so that there are only a few repaints.
from viewer.js.
Maybe start using the shadow dom on browsers that support it!
from viewer.js.
We're seeing this issue on mobile, where the entire (sometimes huge) document is loading on initialization even if they only want to see the first few pages. The resulting load is killing our users.
from viewer.js.
Viewer.js should never load more than ~16 pages at once unless they are somehow visible. Could be a bug, though... are you sure this is the case?
from viewer.js.
I'm seeing it load an entire 23-page document. I can test with a larger one later today.
On version 0.10.1, fwiw
from viewer.js.
Could be that the check for mobile is broken on whatever device/os you're using... What do you see when you log Crocodoc.getUtility('browser').mobile
? On non-mobile (and IE >= 10) we load more pages at once.
from viewer.js.
Ah, I ran that test on a desktop browser :)
But emulating a mobile browser (/w User-Agent), I'm still seeing it load entire documents on first load
from viewer.js.
Regardless, 16 is a little higher than we'd like for our project. Can we make this default configurable?
from viewer.js.
Yep, that's certainly possible! Unfortunately, this option controls both how many pages to load at once and how many pages are "loaded" at once. On mobile devices we also unload pages that go outside of this range to prevent memory issues. The only problem with this is that you'll probably see pages that were once loaded showing a spinner again briefly while they're being re-inserted into the DOM.
from viewer.js.
Related Issues (20)
- Viewer.js memory leak
- box/viewer.js free to use in an ERP HOT 2
- Bugged example on https://developers.box.com/view-api/
- Text not rendering text correctly in Google Chrome HOT 4
- Images not rendering in Microsoft Edge HOT 1
- Is there any way to keep the zoom in/zoom out buttons even on small screens?
- 'pagefocus' event being called before 'ready'
- Enable Text Selection Causes Shadowing of Text
- Chrome Browser Fails to load some converted documents HOT 13
- Markup/Comment Solution HOT 4
- Question: Search Bar Implementation HOT 5
- Loading local assets with XHR HOT 1
- What is the crocodoc-subpx-fix for?
- iOS 9 Safari crashes for the following payload HOT 2
- Uncaught TypeError: Cannot read property 'documentElement' of null
- IOS 10 - Document text garbeled HOT 9
- How to set the default size of the pop picture after click?
- Support for the New Box View APIs HOT 4
- Scroll events: Human vs code triggered. Can we differentiate?
- iframe caching url HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viewer.js.