in reply to Sharing Hash Question
Let’s just all please forget the first misguided volley in this tennis-match and see what can be done to address the problem. I am not sure that spinning it off into multiple threads will be helpful at all, particularly since the to-be shared hash data structure would necessarily be common to all of them and, hence, their execution would wind up being serialized anyhow. I think that BrowserUK was (correctly) trying to focus your attention onto that, even though his choice of wording was ... less-than-delicate.
So, given that we have a technical problem here, let’s just stay focused on that, shall we? The only plausible reason to use threads is to achieve overlapping of I/O. If the root problem is, as I suspect, “paging churn,” having a bunch of threads or processes “churning” at once will merely make the completion time very-significantly poorer than before.
You don’t (and of course, you can’t) explain what “among other things” might be, but my initial impression about almost-any program that takes “a long time” to process “very large” files is that you are burning-up too much memory and/or causing excessive paging behavior ... easy to do with large random access data structures. I would suggest measuring the program as it runs, even informally, to see what kind of memory footprint it has and what’s actually causing the (single...) process to wait. Then, I would reconsider the possible solutions, but setting-aside threading as one of the alternatives.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sharing Hash Question
by BrowserUk (Patriarch) on Jul 05, 2012 at 15:32 UTC | |
by jmmach80 (Initiate) on Jul 05, 2012 at 19:17 UTC | |
by BrowserUk (Patriarch) on Jul 05, 2012 at 19:36 UTC | |
by jmmach80 (Initiate) on Jul 05, 2012 at 22:33 UTC | |
by BrowserUk (Patriarch) on Jul 05, 2012 at 22:34 UTC | |
|