This repository has been archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
batch evidence to an array, avoid JRuby enumerator
The JRuby enumerator uses a thread per next object in an enumerator which proves costly. Hundreds of threads are created (tested with yourkit) when batch-creating evidence due to the "each_slice(500)" of the enumerator. This issue is logged in JRuby: jruby/jruby#2577 The solution employed was to yield each evidence directly to the block and batch 500 into an array at a time. This should avoid the OOM exception received: ava.lang.OutOfMemoryError: unable to create new native thread Indeed the thread count was observed to be lower in yourkit.
- Loading branch information
Anthony Bargnesi
committed
Jan 12, 2016
1 parent
fb58eee
commit a515587
Showing
1 changed file
with
32 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters