Ticket #6223 (new enhancement)

Opened 7 years ago

Last modified 6 years ago

DjVu files not opened by Sugar

Reported by: HoboPrimate Owned by: kimquirk
Priority: high Milestone: 9.1.0-cancelled
Component: sugar Version:
Keywords: 9.1.0:+ Cc: manu, Eben, marco, kim
Action Needed: never set Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Djvu files aren't opened by Read, even though Read supports them in this build (mentioned in olpc weekly news).

It uses a data icon, and I'm not sure which type of icon it should use, since it is used for ebooks (those with many illustrations, or full scans of book pages) but also can be used for collections of images.

Downloading a djvu file, datastore.log:

" 1201387773.189141 DEBUG root: Content.suggestName: None None 1201387773.192564 DEBUG root: FileBackingStore._targetFile: '22c2d3e3-3208-4bbe-803a-5cae98739d67' None None None 1201387787.485447 DEBUG root: Content.suggestName: None 'djvu' 1201387787.489014 DEBUG root: FileBackingStore._targetFile: 'bb68b07a-d5db-4216-9e89-351315b281b3' None 'djvu' None "

Copying it to the clipboard, shellservice.log:

" 1201387881.868312 DEBUG root: Choosing between [dbus.String(u'text/uri-list')]. 1201387881.888698 DEBUG root: Choosed 'image/vnd.djvu'! "

and shell.log:

" 1201387907.469596 WARNING root: No icon with the name image-vnd.djvu was found in the theme. "

Change History

  Changed 7 years ago by walter

  • cc manu added

The DJVU support in Read hasn't hit any of the builds yet, I don't believe.

  Changed 7 years ago by tomeu

  • cc Eben added

Eben, which icon should show have djvu files in the clipboard and journal?

  Changed 7 years ago by marco

  • owner changed from marco to tomeu

I rebuilt sugar-evince and djvulibre... Tomeu are you going to take care of the Read changes?

  Changed 7 years ago by marco

  • milestone changed from Never Assigned to Update.1

  Changed 7 years ago by marco

#6232 has a Read release by Manu. Though it's packaged as a .tar.gz. Tomeu, Manu please coordinate to get this in.

  Changed 7 years ago by rwh

  • cc marco added

Released new version to joyride, after testing will request for inclusion in u.1. Btw, I tested djvu and tiff files in joyride and they seem to work.

  Changed 7 years ago by dgilmore

  • milestone changed from Update.1 to Update.2

update.1 is in feature freeze it is way to late to start adding features now. there is only to bug fixes for critical bugs.

This will be fine for Update.2

  Changed 7 years ago by sj

  • priority changed from normal to high

Manu and I tested djvu vs. pdf rendering of a normal-sized book : Tom Sawyer. A B/W pdf of the 300pg book from the Internet Archive is 18MB ; a full-color djvu is 15MB.

The PDF takes ~50 seconds to render a new page (if you scroll down more than half a page at a time); the DJFU takes ~5 seconds to render a new page.

A 10:1 improvement in wait time is nothing to sneeze at. Many people have been reporting that the book reader is broken; likely because of the unbelievable amount of time it currently takes to render simple texts longer than a dozen pages.

  Changed 7 years ago by sj

Testing again with a ~500 page book (~45M pdf, 20M djvu):

Startup and rendering of the first page takes around 20-25s for both formats. Rendering a new page (skipping 2+ pages) takes 4-5s for djvu, and 20-40s for the pdf.

Less severe than the previous example, but still up to an eight-fold speedup. (significant when turning on suspend/resume, where more than 10 seconds risks suspending before the new page renders!)

  Changed 7 years ago by kimquirk

Performance is a good thing for us to work on... but this is not a blocker for Update.1. I agree with the Update.2 milestone for this.

  Changed 6 years ago by sj

  • cc kim added
  • owner changed from tomeu to kimquirk

Please assign this to something like update 1.1 -- it cuts down on the size of large books by 40-60% and improves page rendering speed by a factor of 5-10.

  Changed 6 years ago by sj

NB : one request I have for peru is testing their standard full-length textbooks. djvu's improved performance becomes more marked as the length of the texts increases -- for a 10-pg story it is not a big deal; for a 500-pg book it is dramatic.

  Changed 6 years ago by marco

  • type changed from defect to enhancement

  Changed 6 years ago by skierpage

  • summary changed from Djvu files not recognized by Sugar to DjVu files not opened by Sugar

In build 708 (a candidate for 8.1.1/Update1.1) with Read activity 45, if you go to http://djvu.org/docs/ in Browse and click a file and download, the Journal volunteers to start the file with Read. But, Read displays blank and 0/0. The problem is probably that the DjVuLibre backend and/or evince-djvu support is not packaged in this build.

(I changed the bug summary to be more general.)

  Changed 6 years ago by marco

  • keywords 9.1.0:+ added
  • milestone changed from 8.2.0 (was Update.2) to 9.1.0

follow-up: ↓ 17   Changed 6 years ago by sj

  • next_action set to never set

see also #6426, which is really a dup of this. Marco, I know you are keen on pushing this out -- if this has to be 9.1, so be it. But Read performance on book-length texts is one of the fundamental uses of the laptop in classes, and anything we can do to speed that up by a factor of 5 we should.

I don't think classing this as an enhancement captures the impact this has on the has on our network of collaborators -- for instance, government groups who could otherwise improve their school's bookreading experience dramatically bey encoding important books in djvu and sharing them with others will not do so for another release cycle.

in reply to: ↑ 16   Changed 6 years ago by marco

Replying to sj:

see also #6426, which is really a dup of this. Marco, I know you are keen on pushing this out -- if this has to be 9.1, so be it. But Read performance on book-length texts is one of the fundamental uses of the laptop in classes, and anything we can do to speed that up by a factor of 5 we should.

I'm never keep of pushing out, I just need to deal with the limited the resources we have on the Sugar team. Anyone is welcome to take the bug and make it 8.2...

I don't think classing this as an enhancement captures the impact this has on the has on our network of collaborators -- for instance, government groups who could otherwise improve their school's bookreading experience dramatically bey encoding important books in djvu and sharing them with others will not do so for another release cycle.

That makes it an high priority enhancement but still an enhancement, imo.

  Changed 6 years ago by skierpage

In Read 49 on joyride-2273, it seems a needed library djvulibre-libs-3.5.20-2.fc9 is present. And trying some of the samples at http://djvu.org/docs/ I had some progress but also blank pages and hangs.

Read shows an appropriate 1 / 10 page control (good!). But each page is blank (bad). But if I zoom out from the View menu (from 230% to 192%), text appears (wahoo!!). But if I zoom in again, Read and the Browse from which I launched it crash (bad!). And I tried the back a page button after paging through a 10-page document and Sugar got so slow the mouse stopped tracking and I had to hold the power button down to power off (ouch!). At one point top in a Terminal activity said Read had VIRT 137m and RES 76m, that's pretty big memory use. I zoomed in again and the mouse stopped tracking and again I had to hold the power button down to power off (arghh!)

The current sort-of works behavior is pretty bad. If my experience isn't an anomaly, maybe it would be better to remove the djvu mime type from the Read activity (as simple as editing activity/activity.info) so Read doesn't advertise any ability to read DjVu. Or just leave things as they are and caution that DjVu viewing has lots of bugs.

  Changed 6 years ago by sj

see also #2448 for history. Someone who has worked on djvu specifically before should take a look.

Note: See TracTickets for help on using tickets.