Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-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 AEA8518A61 for ; Tue, 7 Jul 2015 04:34:14 +0000 (UTC) Received: (qmail 36103 invoked by uid 500); 7 Jul 2015 04:34:14 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 36079 invoked by uid 500); 7 Jul 2015 04:34:14 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 36067 invoked by uid 99); 7 Jul 2015 04:34:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2015 04:34:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [209.85.220.44] (HELO mail-pa0-f44.google.com) (209.85.220.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2015 04:32:00 +0000 Received: by pactm7 with SMTP id tm7so106329146pac.2 for ; Mon, 06 Jul 2015 21:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jahewson.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=YyrTOUopYawA/6FxbtPf91TYPpxMLfTKCPq9DMXAFoo=; b=BJF0qCnxfzPJrIWbBGXZKbEnjx8sqbRMELaq8LUMRlL0OKioHaNQqGga+twgEV/qw3 QcQp1596s+35twXKN57lC0hrGxPVC/2D/FO0/V7ZKOZ/Z0oFlXgbwh1KU1wcryCFSwi/ xmrunZE2XywFxnl6B/u8EkkzZFnp1n2yJWTVY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=YyrTOUopYawA/6FxbtPf91TYPpxMLfTKCPq9DMXAFoo=; b=f5rpLgwimQS8dEzDRkdQ+NmMQ9wahXc3P1oitk/bekzJBI3iBVi6MBSFOEX5Ecx19h gnXqFl56/F7V4jltjArb0RVBgxqoO0qoeYRxUtobiVxUHSeC0A6Qv3cemaPc+NFhrqPy F4yy8Hn1IA4dZtPFBcOH0RSP5m9GnaP1J1zvRozdxCzXi1S5jY9iM0R0PY0a3PBcBst6 1N3zvEdQpLaj5rq3j+hl8/1F4c+4ClHoSCiQOKFmtJ0iqijgXJt1PyaXkXs39StnRQJk 9cO8JuYcG9HKFWeJlCG2iAB0LPMPjyuge3n/wvxbEfx6bj0Sjfr80XZfWpio3PFdw7MF AWng== X-Gm-Message-State: ALoCoQmVqDOqFmlCsw1+4/ecDZUu8U03TkMlEnufj7HTWotba9CJBl0Rlz3QT2fJccmh/eBub6yN X-Received: by 10.68.191.167 with SMTP id gz7mr4685295pbc.43.1436243606832; Mon, 06 Jul 2015 21:33:26 -0700 (PDT) Received: from [10.0.1.7] (c-73-202-194-89.hsd1.ca.comcast.net. [73.202.194.89]) by mx.google.com with ESMTPSA id k8sm17173186pdj.45.2015.07.06.21.33.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 Jul 2015 21:33:26 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: PDFRenderer, PDDocument memory issue From: John Hewson X-Priority: 3 In-Reply-To: <441305402.3810133.1435818580365.JavaMail.open-xchange@ptangptang.store> Date: Mon, 6 Jul 2015 21:33:44 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3B41AB30-72B0-46A4-A551-F079AA598F77@jahewson.com> References: <1435738585.209186772@f345.i.mail.ru> <5593FEAF.5030406@t-online.de> <6F27FA3C-B902-42BD-8439-41C71BC5262C@jahewson.com> <441305402.3810133.1435818580365.JavaMail.open-xchange@ptangptang.store> To: users@pdfbox.apache.org, =?utf-8?Q?Andreas_Lehmk=C3=BChler?= X-Mailer: Apple Mail (2.2098) X-Virus-Checked: Checked by ClamAV on apache.org > On 1 Jul 2015, at 23:29, Andreas Lehmk=C3=BChler = wrote: >=20 >=20 >=20 >> John Hewson hat am 2. Juli 2015 um 06:10 = geschrieben: >>=20 >>=20 >>=20 >>> On 1 Jul 2015, at 07:52, Tilman Hausherr = wrote: >>>=20 >>>> Am 01.07.2015 um 10:16 schrieb Alex Sviridov: >>>> In my application I have real time memory graphs and they show that = memory >>>> is very fast filled. >>>> When there is no more free memory getPageThumbImage hangs - no = exception, >>>> nothing. But the code stops. >>>> When I do pdfDocument=3Dnull,pdfRenderer=3Dnull I get about 400mb = free memory. >>>> How to solve this problem? >>>=20 >>> If you're building from source, try this: in PDImageXObject.java, = remove the >>> line "cachedImage =3D image;". This will consume less space if you = have large >>> PDFs with many images. >>=20 >> We don't retain XObjects across pages (anymore), so that shouldn't be = the >> cause of his gradual memory increase? > IMHO, it's quite simply to explain. During the initial parse all = streams are > read and all the data is stored in COSStream (see = COSParser#parseCOSStream). > That isn't a new behaviour and I'm working on a better solution (it's = my last > TODO in PDFBOX-2301) So it=E2=80=99s cached data in COSStream? That wouldn=E2=80=99t be = affected by "cachedImage =3D image;=E2=80=9D but it would certainly explain the increasing heap usage. Glad to hear = that you have an improvement underway! =E2=80=94 John >>> Tilman >>>=20 >>>=20 >>>=20 >>> = --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >> For additional commands, e-mail: users-help@pdfbox.apache.org >=20 > BR > Andreas >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org