• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lag with large PDF files
#1
Hi everyone,

I use a Microsoft Surface Pro 6 (Intel Core i7, 8GB RAM, 256 GB) for MobileSheets. For the most part, it has worked great, and despite a bug where sometimes the following page doesn't load when I turn the page, I feel comfortable using it in performance because it's very, very rare.

However, now that I'm playing for my first opera since covid (and since using my tablet instead of physical paper), I'm noticing that MobileSheets has more problems dealing with big PDF files. Opera piano/vocal scores tend to be in the hundreds of pages, and this is no exception. This is also a newer opera with literally hundreds of errata, so I've made countless annotations. I can't flatten these annotations because it's likely there will be even more changes during the rehearsal period, and I can't predict where. 

Unfortunately, with such gigantic PDFs and so many annotations, I've noticed a bit of lag when turning pages, and noticeably more lag when making new annotations. Here are some of the problems I'm facing:

1) Sometimes regular page turning (with my bluetooth pedal) takes almost a second, and that's way too long in this context to be acceptable. This is not the case with most other smaller PDFs

2) When trying to jump from one page to another one far away (such as straight from page 1 to page 100), the app inevitably freezes for several seconds. (up to 10!!)

3) In annotations mode, sometimes when writing with my Surface Pen I have to wait about a second before the drawing actually shows up, and then it's not even what I actually drew. For example, if I draw a "C", it'll end up looking more like an "l" because it draws a straight line from my first point of contact to the last, when I release the pen.

4) In annotations mode, sometimes after trying to draw several strokes quickly, the app freezes for several seconds. Sometimes it force closes after freezing, others it resumes just fine.



The app usually doesn't force close unless I'm in annotations mode actively drawing or erasing, thankfully. However, even that is unacceptable in a fast-paced rehearsal setting.

I already split the PDF into separate acts, so Act I is only about 160 pages and Act II about 120, but it only helped minimally. I made sure the PDFs were as efficient as possible, as well.

Is this just a matter of needing more RAM? Or is MobileSheets simply not built to handle such big files and thousands of annotations? My annotation settings, as far as I can tell, are also as efficient as possible, with "Combine freeform annotations" checked.

Having a flawless experience is so important that I've just purchased a Surface Pro 8 (i7, 32 GB RAM, 1TB), but after spending over $2000, I'm wondering if this will actually be worth it or if it's more of a MobileSheets issue. It particularly worries me that even when there's lag, actively looking at the Task Manager in my current Surface Pro 6 shows that MS is only using about 600MB of RAM, far less than what I actually have available. This makes me think more RAM may not solve the problem. Same thing with CPU - it doesn't actually quite reach what is available.

Please advise.
Reply
#2
No idea but you could try writing the file out with the annotations embedded,
Then import this new file and see if it suffers from the same lag issues.
If it does still lag, then that would indicate that the annotations are not the problem.

Geoff
Samsung Galaxy Tab A6
Reply
#3
(08-01-2022, 04:18 AM)Geoff Bacon Wrote: No idea but you could try writing the file out with the annotations embedded,
Then import this new file and see if it suffers from the same lag issues.
If it does still lag, then that would indicate that the annotations are not the problem.

Geoff

Thanks Geoff!

I did think about this, but unfortunately, as I mentioned in the original post, I can't afford to flatten the annotations because there will very likely be changes to those during the rehearsal period, and I need to be able to erase them and change them on the spot...
Reply
#4
It might just be that individual pdf file.  Internally, pdf files are quite a mess since they can include all kinds of graphics, fonts, vectors and ghawd-knows-what as elements in almost any order.  They're almost (but maybe not quite) as much of a technical mess as Microsoft Docx files -- those contain everything up to and including raw memory dumps from your computer.

Having said that, you might want to try rebuilding that pdf.  If it's an internal hodge-podge of random elements, you could convert each page to a single image and make those images into a PDF file where there is just one simple image per page.  If you name it the same as the original pdf file on your tablet, then it would just be a drop-in replacement for what you have now and (as far as I know) all of your annotations should remain intact just as they are now.

There are several ways to go about doing this.  One of the easiest ways (especially for something with lots of pages) is to use imagemagick to convert the pdf to individual images (like a series of png files), then use imagemagick again to combine those images back into a pdf file.  At this stage you can also vary the density and size of the image of each page to optimize it for maximum readability on your screen if you like, balanced with maximizing the performance, of course.

After doing that (which may or may not take some experimentation depending on what your expectations are and how much time you want to put into optimization), you can compress the resulting pdf file and give it a more streamlined internal structure, which should also speed it up some when you're reading it on the screen.  Ghostscript will do that for you; here is a short script that I use for exactly this purpose:

#!/bin/bash
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${1%/}".screen.pdf "${1%/}"
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${1%/}".ebook.pdf "${1%/}"


This will give you two different output pdf files, named something.screen.pdf and something.ebook.pdf respectively.  The .screen file will (usually) be smaller than the .ebook file but it will (sometimes) be of a poorer output quality, so you'll want to view both of the output files and decide which one you want to keep after doing the compression.

After doing this, you will hopefully have a pdf file that will render faster and that should rev up the page turning and other pdf reading functions to at least some degree.
If you're a zombie and you know it, bite your friend!
We got both kinds of music: Country AND Western
Reply
#5
You could try using MS on your PC to see if its hardware related.
Dell Latitude 13.5" 2-in-1 Ubuntu/Win 11
Samsung Note Pro SM-P900 12.2 Android 5.0.2
Samsung S7+, Android 12
Reply
#6
YellovvYoshi - We definitely need to determine where the slowdown is occurring. It's most likely not related to RAM in any way. It's much more likely to be the speed at which MobileSheets can render the pages which can be a combination of GPU and CPU processing. If the PDF itself is poorly optimized, then following the instructions that Frank Cox provided could actually significantly help with the problems you are seeing. I have had PDFs users have sent me that took 6-10 seconds to load and after I rebuilt the file, it took a fraction of a second. How long is it taking for the first page of the file to render and show up when you first load it? If it's taking a full second or more, then there is probably a lot of room for improvement. I'm not sure if you are allowed to share the file you are using, but if you want to select it on the library screen, tap Share->Export as .msf and share the .msf with mike@zubersoft.com, I'd be happy to take a look at the performance on several of my devices to see if I also experience what you are seeing. If you can't share the file, then investigating this will become a little more difficult, so I would suggest starting with rebuilding the file if you can.

Mike
Reply
#7
Thanks everyone for your help!

I tried Frank Cox's suggestion, and after spending a few hours getting familiar with the relevant software, I couldn't get a PDF of either smaller size or that would avoid any of the problems I mentioned originally. Honestly, the PDF already seems efficient because the first page does load immediately when opening it on MobileSheets.

FWIW, I had already used Drawboard PDF's "Reduce file size" feature which I *think* does something similar, but I can't find documentation online on exactly what it does. It did reduce the file size a bit when I did it, more so than what I could achieve with imagemagick. Of course, there's always a chance I just couldn't figure out the right parameters.

I also ran MS on my main desktop with an i9-10900 and 64GB of RAM, and the annotation problems were nonexistent. Turning pages was still slow when jumping from page 1 to 100, but regular page turning with my bluetooth pedal was not laggy at all.

Anyway, I'll be sending the .msf file your way, Mike. Thank you!
Reply
#8
This isn't of much (direct) help to you, but I have a number of pdf files that are pretty darn big and none of them show much (if any) lag when I read them on my Android tablet with MobileSheets.

I just tried with a fakebook that is 777 pages long and there's no lag at all when I move around among the pages.

I'm not sure if I have any annotations in that one, though.  It's just plugged into some of my setlists.

My tablet isn't anything really super-duper either.  It's a Galaxy Tab S2.
If you're a zombie and you know it, bite your friend!
We got both kinds of music: Country AND Western
Reply




Users browsing this thread:
3 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.