Skip to content

Commit

Permalink
add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 22, 2024
1 parent 7dbbf46 commit 868f248
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ private Pair<Collection<IResult>, Long> generateResultHelper(
Map<String, Pair<IRule, IRule>> rulesWithDependencies = new HashMap<>();
Map<IRule, IResult> computedResults = new HashMap<>();
try (CountingInputStream countingRecordingStream = new CountingInputStream(recording)) {
// TODO parsing the JFR file should also happen on the executor rather than the qThread,
// so that this method can return to the qThread more quickly and free up the ability to
// queue more work on the executor.
IItemCollection items = JfrLoaderToolkit.loadEvents(countingRecordingStream);
for (IRule rule : rules) {
if (RulesToolkit.matchesEventAvailabilityMap(items, rule.getRequiredEvents())) {
Expand Down Expand Up @@ -155,6 +158,10 @@ private Pair<Collection<IResult>, Long> generateResultHelper(
.build()));
}
}
// TODO this implementation forces rule dependencies to be evaluated on the qThread. The
// executor is only used for rules that have no dependencies or which have all their
// dependencies satisfied (by the qThread). Ideally we should perform all of the rule
// evaluations on executor threads.
for (Entry<String, Pair<IRule, IRule>> entry : rulesWithDependencies.entrySet()) {
IRule rule = entry.getValue().left;
IRule depRule = entry.getValue().right;
Expand Down

0 comments on commit 868f248

Please sign in to comment.