all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Carlos Aguilar <carlos.aguilar@unilim.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestion / feature request
Date: Thu, 19 Apr 2012 20:59:31 +0200	[thread overview]
Message-ID: <87hawfsg30.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <4F904830.5010401@unilim.fr> (Carlos Aguilar's message of "Thu, 19 Apr 2012 19:15:28 +0200")

Carlos Aguilar <carlos.aguilar@unilim.fr> writes:

Hi Carlos,

> time (mkdir file1_burst; cd file1_burst; pdftk ../file1.pdf burst; cd ..
> mkdir file2_burst; cd file2_burst; pdftk ../file2.pdf burst
> for I in pg*; do echo $I; diff -a $I ../file1_burst/$I|grep -v 
> 'BaseFont\|FontName\|Creator\|Info\|...c...\|\-\-\-\|..c..'; done
> cd .. ; rm -Rf file1_burst; rm -Rf file2_burst)
>
> pg_0085.pdf
> < x?T?n?0
>          ??W?(5CQ??^
> < 0000059304 00000 n
>> 0000059305 00000 n
> < 0000059402 00000 n
> < 0000059466 00000 n
> < 0000059513 00000 n
>> 0000059403 00000 n
>> 0000059467 00000 n
>> 0000059514 00000 n
> < 59672
>> 59673
> pg_0086.pdf
>
> real    0m7.009s
> user    0m6.160s
> sys    0m0.210s
>
> This can probably be optimized much. The only page for which there is
> a difference is the one with a change. Doc-view reconversion needs in
> the same computer 20 seconds.

Hm, seven seconds is not so super-fast compared to a complete
reconversion taking 20 seconds.  And if you edit one of the first pages
in the TeX doc, it takes additional 7 seconds to find out that you have
to reconvert almost everything, anyway.

Especially consider that you are most probably viewing page 85 when you
change it in the TeX document and recompile.  Then, if doc-view would
use such a diff-command it'll take 7 seconds for it to know that it
needs to reconvert only page 85.  The current doc-view behavior is to
start the reconversion immediately *with the current page first*.  So
right now, you'll see your changes on the current page almoust
instantly.

The many temporary files are a bit problematic, too...

Another problem is that while we can somehow expect that most (at least
GNU/Linux) machines have GhostScript installed, but that's probably not
the case for pdftk.

But in general, if there was some command that given to PDF files
quickly tells me the pages that differ, I'd try to make use of it in
doc-view, of course, as an optional feature.  But "quickly" means
something around one second for a 100 pages doc.

Bye,
Tassilo



  reply	other threads:[~2012-04-19 18:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 13:28 Suggestion / feature request Carlos Aguilar
2012-04-19 14:17 ` Tassilo Horn
2012-04-19 16:36   ` Carlos Aguilar
2012-04-19 17:15   ` Carlos Aguilar
2012-04-19 18:59     ` Tassilo Horn [this message]
2012-04-19 22:21 ` Stefan Monnier
2012-04-20 18:15   ` Tassilo Horn
2012-04-20 20:16     ` Stefan Monnier
2012-04-23  7:06       ` Carlos Aguilar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hawfsg30.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --cc=carlos.aguilar@unilim.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.