[lug] File modification

Ken Weinert mc at morat.net
Thu Mar 14 06:05:34 MST 2002

Hash: SHA1

On Wednesday 13 Mar 2002 16:45, you wrote:
>  From my experience, working in "the industry" will be just like trying
> to get class assignments done and working the night before they're due.

	And the assignments will be given out after they're due.

> There _always_ seems to be some last minute items that wasn't accounted
> for in the schedule.  And it's always hard to schedule the unexpected
> problems that seem to appear.


	I've just spent about a week and a half trying to get a PDF program working. 
It worked fine for me - but then we create it as a shared lib (it's C++) and 
call it through JNI from an RMI interface. That part doesn't work so well. 
Turns out it leaks memory like a sieve.  Ok, I go back and find a couple of 
stupid mistakes in my code, fix them, it still leaks.  The provider of the 
library (not open source, not my call) says they have a lot of people using 
this library without any problems. After 4 or 5 days of this they volunteer 
to take a look at my code (mainly, I think, to prove the problem is in my 
code :) and I get a reply back the next day: "Oh, you were supposed to call 
this function before the object goes out of scope - it turns out the 
destructor doesn't clean up all the memory. We're fixing that."

	Ok, that's one problem solved - now it still doesn't work under the multiple 
threading environment. Note that my code isn't internally threaded, it just 
has to run in multiple threads. Again, a couple of things on my side that 
weren't thread safe, fix them, it still doesn't work.  Back to the company. I 
get a "more thread safe" version of the library. It's better, but it still 
doesn't work. *sigh* After a couple more days of discussion I get a version 
of the library that was compiled with -fPIC.  Initial test looks good - 
process 100,000 documents in a bit over 2 hours.

	Package it up in the form to be called from java, send it off, start a new 
test. So far I've processed between 600,000 and 700,000 documents (test 
program runs 100 threads, keeps cycling between the 4500 input documents) in 
about 16 hours. Looks like we have a winner.

	In spite of the problems with the library I would recommend these folks if 
you happen to need a commercial PDF library. The documentation is a bit 
lacking (personal opinion, it might be my lack of familiarity with the 
C++/PDF combo that influences that opinion :) but they were quick to help and 
answer questions and such. 

- -- 
Ken Weinert   mc at morat.net
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Copywight 1994 Elmer Fudd.  All wights wesewved.

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


More information about the LUG mailing list