ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Best way to create a large number of documents from database
Date: Thu, 23 Apr 2020 08:48:13 +0200	[thread overview]
Message-ID: <CALBOmsbW6KNeJPgQkBpaNx0hsKCB6vCHLdNU7OPc2fSMAvCsJg@mail.gmail.com> (raw)
In-Reply-To: <1cc6c718-323d-ef42-fe08-a74007ce49a3@xs4all.nl>

On Fri, 17 Apr 2020 at 21:11, Hans Hagen wrote:
> On 4/17/2020 4:37 PM, Mojca Miklavec wrote:
>
> > One of the interesting statistics.
> > I used a bunch of images (the same png images in all documents; cca.
> > 290k in total).
>
> It can actually make a difference what kind of png image you use. Some
> png images demand a conversion (or split of map etc) to the format
> supported by pdf. Often converting the png to pdf and include those is
> faster.

Thanks for the hint. But I tested it and it hardly makes any difference.
I had to make another batch for the archive (creating a single
document with 4k+ pages), and the full process ran in 10 minutes
(compared to cca. 2,5 hours to create individual documents). Just for
a test run I completely **removed** all the images and it only
accounted for some 10 or 20 seconds speedup. So the biggest overhead
still seems to be in warming up the machinery (which includes my share
of overhead for reading in the 1,3 MB lua table with all data entries)
and Taco's hint of using an external tool for splicing would have
probably scored best :)

I need to add that I'm extremely happy about the resource reuse
(mostly images). As I already mentioned before, individual documents
were 1,5 GB in total, and a badly written software would have created
an equally bad cumulative PDF, while ConTeXt generates a merely 17 MB
file with 4k+ pages. It's really impressive.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2020-04-23  6:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  9:12 Mojca Miklavec
2020-04-16  9:29 ` Taco Hoekwater
2020-04-16 14:38   ` Mojca Miklavec
2020-04-16 14:52     ` Hans Hagen
2020-04-16 16:39       ` kaddour kardio
2020-04-16 17:46       ` template system (was: Best way to create a large number of documents from database) Henning Hraban Ramm
2020-04-16 17:57         ` template system Wolfgang Schuster
2020-04-16 18:23           ` Henning Hraban Ramm
2020-04-16 18:32       ` Best way to create a large number of documents from database Mojca Miklavec
2020-04-16 19:01         ` Pablo Rodriguez
2020-04-16 20:03         ` Hans Hagen
2020-04-17 14:37     ` Mojca Miklavec
2020-04-17 19:11       ` Hans Hagen
2020-04-23  6:48         ` Mojca Miklavec [this message]

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=CALBOmsbW6KNeJPgQkBpaNx0hsKCB6vCHLdNU7OPc2fSMAvCsJg@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).