optimising

Ok im a bit pissed cus I cant optimise my client side code enough, i've broken it down

I get the ids then the dataobjects separetly
Why oh why am i Still getting
"Exception in thread main java.lang.OutofMemoryError"

I've trimmed down the code as much as possible i think there must be a memory leak somewhere.
Is the error coming from the server? do I need to change the startup params.
I'm discarding the remotesession each time, does the disconnect send a message to the server? or does it just invalidate a client side object thereby leaving the server to timeout the session data?

I havent played much with caching but im assuming that the error is client side , (however i have been unable to trace it to its source so maybe its from the server)
Is there some kind of memory leak?
perhaps i shouldnt create a session inside a for loop, im just trying to cut down on lexical scope!

Strangest of all is that the error occurs half way through traversing the list and 'getting' data from the datarecord!

Any ideas appreciated: psuedo code follows

pseudo code
DEFINE IDLIST, OBJECTLIST
NEW REMOTESESSION.GETIDS
EXTRACT DATA SET TO LIST
REMOTE SESSION DISCONNECT
FOR IDS IN LIST
NEW REMOTESESSION.GET OBJECT BY ID
ADD OBJECT TO LIST
REMOTE SESSION.DISCONNECT
END FOR

optimising

http://www.regular-expressions.info/lookaround.html

These features dont seem to be supported I had a look in the error log and it reported that it couldnt parse my regex.

I'm still trying to find some ORO doco to assert whether its just a different syntax, however ORO is supposed to be PERL 5 Regex compatible , which the link above asserts also.

Make of that what you will.....

....update to follow

optimising

Hi,

We use Jakarta ORO (here) for the regular expressions. It's pretty full-featured. Would you mind poking around through the documentation, and posting back a few more specifics on what seems to be missing?

Thanks,

Todd

optimising

my mistake all along , un terminated loop , sorry for inconvienice

btw, is it possible that we can get a more powerful regex parser for the next update , this one doesnt seem to support look behinds which i think would be VERY useful

optimising

Hi,

It's a little tough to say where the issue is, based on your pseudo-code, but I'll bet we can figure it out.

Is the OutOfMemoryError originating from your code, the screen-scraper driver (the RemoteScrapingSession class), or screen-scraper itself (i.e., showing up in screen-scraper's error.log or wrapper.log files)? Do you get any kind of a stack trace? Where is it showing up?

Especially if you're disconnecting each time on your RemoteScrapingSession, you should be fine. It shouldn't be a problem to loop like you are.

Kind regards,

Todd Wilson