Re: [iText-questions] Guidance Requested - Generating multipage output with header/footer and pg 1 layout

2010-04-28 Thread Giovanni Azua
Hello Daniel, On Apr 28, 2010, at 1:32 AM, Daniel Cane wrote: Interesting - could you show me how you define your spot function? The idea of simply assembling a 'top' spot, 'left' spot and 'right' spot is appealing, but I'm a little lost on how to implement it. Are spots = paragraphs or

Re: [iText-questions] Guidance Requested - Generating multipage output with header/footer and pg 1 layout

2010-04-27 Thread Giovanni Azua
Hello Daniel, Please note that I am a relatively newbie with iText. I have been recently faced with similar questions as yours and this is my attempted solution ... perhaps it will give you some ideas. On Apr 27, 2010, at 9:58 PM, Daniel Cane wrote: My first approach was attempting to

Re: [iText-questions] performance follow up

2010-04-24 Thread Giovanni Azua
Hello, On Apr 23, 2010, at 10:50 PM, trumpetinc wrote: Don't know if it'll make any difference, but the way you are reading the file is horribly inefficient. If the code you wrote is part of your test times, you might want to re-try, but using this instead (I'm just tossing this together -

Re: [iText-questions] performance follow up

2010-04-24 Thread Giovanni Azua
On Apr 24, 2010, at 8:59 PM, trumpetinc wrote: If the file is being entirely pre-loaded, then I doubt that IO blocking is a significant contributing factor to your test. After I did the entire pre-loading, taking the entire file at once the benchmarks look better yes, meaning there is some

Re: [iText-questions] performance follow up

2010-04-23 Thread Giovanni Azua
Hello Mike, On Apr 23, 2010, at 12:55 AM, Mike Marchywka wrote: Mark Twain gets to the front so quickly. Again, I'm not suggesting you did anything wrong or bad, I haven't actually checked numbers or given the specific test a lot of thought- 9 data points is usually not all that conclusive

Re: [iText-questions] performance follow up

2010-04-23 Thread Giovanni Azua
Hello Paulo, On Apr 22, 2010, at 11:43 PM, Paulo Soares wrote: FYI I already use a table to map the char to the result for the delimiter testing and the speed improvement was zero in relation to plain comparisons. Paulo You are right ... changing to a table makes no difference. I checked

Re: [iText-questions] performance follow up

2010-04-23 Thread Giovanni Azua
On Apr 22, 2010, at 11:18 PM, trumpetinc wrote: I like your approach! A simple if (ch 32) return false; at the very top would give the most bang for the least effort (if you do go the bitmask route, be sure to include unit tests!). Doing this change spares approximately two seconds out

Re: [iText-questions] performance follow up

2010-04-23 Thread Giovanni Azua
Hello trumpetinc, On Apr 23, 2010, at 7:29 PM, trumpetinc wrote: Giovanni - if your source PDFs are small enough, you might want to try this, just to get a feel for the impact that IO blocking is having on your results (read entire PDF into byte[] and use PdfReader(byte[])) Trying it right

Re: [iText-questions] MISTAKE! performance follow up

2010-04-23 Thread Giovanni Azua
I am sooo sorry the performance is worse with the change for pre-loading the PDFs in the test-case :(( the problem was that I ran the benchmarks with a small mistake in my test case ... The HEADER tests how to load flattened PDF part templates ... The FOOTER tests how to load PDF part

Re: [iText-questions] AWESOME! performance follow up

2010-04-23 Thread Giovanni Azua
I am sooo sorry the performance is worse with the change for pre-loading the PDFs in the test-case :(( the problem was that I ran the benchmarks with a small mistake in my test case ... Loading the HEADER demonstrates how to load flattened pre-formatted PDF part templates ... Loading

Re: [iText-questions] performance follow up

2010-04-23 Thread Giovanni Azua
Hello trumpetinc, On Apr 23, 2010, at 10:50 PM, trumpetinc wrote: Don't know if it'll make any difference, but the way you are reading the file is horribly inefficient. If the code you wrote is part of your test times, you might want to re-try, but using this instead (I'm just tossing this

Re: [iText-questions] performance follow up

2010-04-22 Thread Giovanni Azua
Hello, On Apr 22, 2010, at 6:49 PM, 1T3XT info wrote: Paulo Soares wrote: Thank you. I'll include your changes. Due to the lack of time, I wasn't able to follow the discussion, but I've just read the latest mails, and I also want to thank you for the performance tests and improvements.

Re: [iText-questions] performance follow up

2010-04-22 Thread Giovanni Azua
Hello Mike, On Apr 22, 2010, at 12:22 PM, Mike Marchywka wrote: This of course is where you consult Mark Twain. LOL. iText is or isn't better than before ( for some particular use case) irrespective of the data you currently have but the question is does the data allow you to reject the

Re: [iText-questions] performance follow up

2010-04-22 Thread Giovanni Azua
Hello, On Apr 22, 2010, at 10:59 PM, Giovanni Azua wrote: PRTokeniser.isWhitespace is a simple boolean condition that just happen to be called gazillion times e.g. 35'622'000 times for my test workload ... if instead of doing it like: public static final boolean isWhitespace(int ch

Re: [iText-questions] performance follow up

2010-04-22 Thread Giovanni Azua
Hello, On Apr 22, 2010, at 11:30 PM, trumpetinc wrote: The semantics are different (the JSE call includes more characters in it's definition of whitespace than the PDF spec). Not saying that it can't be easily done, but throwing an if statement at it and seeing what impact it has on

[iText-questions] eclipse project

2010-04-21 Thread Giovanni Azua
Hello, I just checked out trunk to try out some changes related to the performance question thread. Is there an easy way to get an eclipse project ... I already tried: cd src/ant mvn eclipse:eclipse -DdownloadSources=true with no luck ... it does not generate the expected eclipse project for

Re: [iText-questions] eclipse project

2010-04-21 Thread Giovanni Azua
Sorry! never mind! I managed with the plain old wizard :) I am too spoiled with Maven ... On Apr 21, 2010, at 11:18 PM, Giovanni Azua wrote: Hello, I just checked out trunk to try out some changes related to the performance question thread. Is there an easy way to get an eclipse

[iText-questions] performance follow up

2010-04-21 Thread Giovanni Azua
Hello, Good news ... after applying the attached patch to trunk and doing yet another performance experiment using the previously posted workload these are the results: BEFORE (trunk) MeanVariance 15.125 5.514 15.440 3.474 15.258 9.736 15.621 23.869 15.449 4.817 15.500 2.662 15.221