Return-Path: X-Original-To: apmail-xmlgraphics-fop-users-archive@www.apache.org Delivered-To: apmail-xmlgraphics-fop-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C85817993 for ; Fri, 5 Aug 2011 14:44:22 +0000 (UTC) Received: (qmail 59558 invoked by uid 500); 5 Aug 2011 14:44:22 -0000 Delivered-To: apmail-xmlgraphics-fop-users-archive@xmlgraphics.apache.org Received: (qmail 59483 invoked by uid 500); 5 Aug 2011 14:44:21 -0000 Mailing-List: contact fop-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: fop-users@xmlgraphics.apache.org Delivered-To: mailing list fop-users@xmlgraphics.apache.org Received: (qmail 59476 invoked by uid 99); 5 Aug 2011 14:44:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2011 14:44:21 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thesing@gmx.de designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mailout-de.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 05 Aug 2011 14:44:14 +0000 Received: (qmail 15929 invoked by uid 0); 5 Aug 2011 14:43:53 -0000 Received: from 221.140.155.194 by www009.gmx.net with HTTP; Fri, 05 Aug 2011 16:43:52 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Fri, 05 Aug 2011 16:43:52 +0200 From: "Stephan Thesing" In-Reply-To: <20110803085535.GA2591@leverkruid.eu> Message-ID: <20110805144352.207980@gmx.net> MIME-Version: 1.0 References: <20110803082348.183170@gmx.net> <20110803085535.GA2591@leverkruid.eu> Subject: Re: FOP and large documents (again) To: fop-users@xmlgraphics.apache.org X-Authenticated: #33764406 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1+wH+9/p7Ow11xkqGLi5Prpp1gDLHTBCrftPGMUVu amnx7GoR1ETCGS99jr3sK3gRVXOBtYjslG0A== Content-Transfer-Encoding: 8bit X-GMX-UID: nzkJenUbRkkNc0JOcGZqk+9udWkvKJOK X-Virus-Checked: Checked by ClamAV on apache.org Hi, since I will need a scalable first-fit algorithm for page layout I will look into this (or have a student look at it). I can live with the suboptimal page layout the first-fit will produce. Best regards Stephan -------- Original-Nachricht -------- > Datum: Wed, 3 Aug 2011 10:55:35 +0200 > Von: Simon Pepping > An: fop-users@xmlgraphics.apache.org > Betreff: Re: FOP and large documents (again) > On Wed, Aug 03, 2011 at 10:23:48AM +0200, Stephan Thesing wrote: > > Looking at the code (as far as I understand it), for each page-sequence > > all KnuthElements are computed first by the layout managers. > > This is split only for forced page breaks. > > Then on the whole sequence, possible page break positions are searched > for. > > > > Only after this are the actual output areas computed and pages produced. > > > > Clearly, this doesn't scale for large page-sequences... > > > > Is there a reason why this approach was chosen, instead of "lazily" (or > on-demand)computing KnuthElements, putting them on the page and as soon as > it is filled, pass it to the renderer? > > Both line and page breaking use the Knuth algorithm of a total fit. > The algorithm requires the complete content before it can be applied. > Clearly TeX does not do this; for page breaking it uses a best fit > approach. > > For FOP it would be better if it could apply either strategy, at the > demand of the user. But FOP is coded such that it first collects all > content, in the process doing all line breaking in paragraphs, before > it starts its page breaking algorithm. Therefore a best fit page > breaking algorithm does not solve the memory problem. Changing this so > that page breaking (best or total fit at the user's choice) is > considered while collecting content has proven too hard (or too > time-consuming) until now. See e.g. > http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/. > > There is a best fit page breaking algorithm, which is mainly used for > cases with varying page widths. But it is a hack in the sense that it > throws away all collected content beyond the current page, and > restarts the process. > > So, help needed. > > Simon > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org > -- Dr.-Ing. Stephan Thesing Elektrastr. 50 81925 München GERMANY NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org