-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scaling up profileApply #112
Comments
Excellent, this is almost a drop-in upgrade to I'll have to think / research about how we can automatically invoke parallelism without bringing-in a bunch of additional dependencies. Also, enforcing a unique horizon or site level ID via #111 would solve the problem of a non-deterministic re-ordering of results returned by parallel processing. |
I wondered about an argument that takes an optional parallel lapply-like function -- eg And yes, this would combine well with the |
|
Sweet! Much better than invoking parallel voodoo. It would like like this is a drop-in addition to |
Pending a couple more tests, this is just about ready to go. Testing on 10k profiles:
|
Note that the profiling done above includes the additional overhead of |
Sahweet. With b4c171f I think my last dangling issues with this issue are resolved and this issue can be closed I had made a note pertaining to the sort option needing to be false, but didn't get around to changing over the weekend. Aand good catch with stringsAsFactors -- that one always gets me |
As has long been known, profileApply don't scale well.
Below is a first stab at speeding it up; benchmark times are on an old MacBook.
Splitting the operation up into several runs of profileApply (resulting in more, smaller lists) seems to enhance performance significantly in the examples below with 1,000 and 10,000 random profiles.
The chunk size is hardcoded at 100 profiles -- which seems to enhance performance in the thousands to tens of thousands. There is, as expected, some slight overhead relative to straight profileApply when using 100 profiles. Not sure what the upper end of this will be, but presumably as the number of chunks starts to get large, the effective rate of number of profiles applied will decrease.
This is run in a single thread, but this layout lends itself reasonably well to adding parallel computation option.
100 PROFILES
1,000 PROFILES
10,000 PROFILES
The text was updated successfully, but these errors were encountered: