Open
Conversation
modified: src/main/java/picard/analysis/CollectInsertSizeMetrics.java
modified: src/main/java/picard/analysis/CollectGcBiasMetrics.java modified: src/main/java/picard/analysis/CollectInsertSizeMetrics.java
…e from walker and executing method accpetRead Created Semaphore to limit number of in-memory objects Tested. Works.
Deleted debug output (measuring time), wrote comments
kamyshova
reviewed
Apr 16, 2017
Owner
kamyshova
left a comment
There was a problem hiding this comment.
Исправьте замечания + поработайте с sonar. И попробуйте распараллелить по программам.
| if (walker == null || tmpRecord.getReferenceIndex() == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) { | ||
| ref = null; | ||
| } else { | ||
| ref = walker.get(tmpRecord.getReferenceIndex()); |
Owner
There was a problem hiding this comment.
Вы точно уверены, что этот код синхронизирован? Потому как walker не синхронизирован.
| ExecutorService acceptReadService = Executors.newSingleThreadExecutor(); | ||
|
|
||
| //Limit for tasks into services' queues | ||
| Semaphore semaphore = new Semaphore(SEMAPHORE_PERMITS); |
Owner
There was a problem hiding this comment.
Лучше использовать BlockingQueue с размером в ThreadPool.
| try { | ||
| refReadService.awaitTermination(1, TimeUnit.DAYS); | ||
| } catch (InterruptedException e) { | ||
| e.printStackTrace(); |
| public void run() { | ||
| for (Pair<SAMRecord, ReferenceSequence> pair : pairs) { | ||
| for (final SinglePassSamProgram program : programs) { | ||
| program.acceptRead(pair.getKey(), pair.getValue()); |
Owner
There was a problem hiding this comment.
Нельзя, чтобы параллельно на одной программе обрабатывалось несколько рекордов.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Used two SingleThreadExecutors for parallel computing in makeItSo
Didn't use JMH yet
Checklist (never delete this)
Never delete this, it is our record that procedure was followed. If you find that for whatever reason one of the checklist points doesn't apply to your PR, you can leave it unchecked but please add an explanation below.
Content
Review
For more detailed guidelines, see https://github.com/broadinstitute/picard/wiki/Guidelines-for-pull-requests