"Remove indents at beginning of lines" sometimes greatly slow down conversion

Bug #1965443 reported by Z Yin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

(Portable v5.38 on Win10)

To reproduce:

Convert the attached txt into EPUB. (It's in Chinese, but that shouldn't be a problem)

In conversion options, if `TXT input > Common > Remove indents at beginning of lines` is enabled, the conversion will take 3 times longer than when disabled.

This doesn't happen to every book. I believe there's some special paragraph in this txt that is causing it. I tried to locate it by deleting paragraphs in a binary search fashion, but it gets increasingly hard for me as the conversion time gets shorter and shorter. I'm sure you have better tools to locate it.

If you append these text into another large book, it'll triple their conversion time too. For instance, if a large book takes 5 minutes to convert, appending these text will make it 15 minutes if you turn on `Remove indents at beginning of lines`.

It's not a bug, but I thought you might be interested.

Revision history for this message
Z Yin (zyinmd) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1965443

There is no option to remove indents. Do you mean the option to replace
entity indents with CSS indents in the heuristic processing section of
the conversion dialog? Heuristic processing is in general slow, and off
by default.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Z Yin (zyinmd) wrote :
Revision history for this message
Z Yin (zyinmd) wrote :

..which I believe is not heuristic, and usually not slow. As I mentioned, other books have exactly the same conversion time with this option turned on vs off, only the attached book has this issue. What I attached was actually 1/4 of my initial book, because I narrowed down with binary search twice.

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.