You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have come up with a project to implement the function. After I get the function working logically, I start check the performance of the app and found issue with osgl-tool library.
Issue
I have generated 100 log files with each file got 2M lines. Then I run my code. What I found is when I change this line:
for (Stringline: bigLines) {
if (line.contains(keyword) {
lineCollector.accept(line);
}
}
The performance has been improved from 12s to 10s. I use VisualVM to inspect what happened, and found there are lots of temporary objects created when we are using the functional programming style:
The text was updated successfully, but these errors were encountered:
Context
In a technical chat room, it was talking about use a Java program to simulate the following shell command:
I have come up with a project to implement the function. After I get the function working logically, I start check the performance of the app and found issue with osgl-tool library.
Issue
I have generated 100 log files with each file got 2M lines. Then I run my code. What I found is when I change this line:
to
The performance has been improved from 12s to 10s. I use VisualVM to inspect what happened, and found there are lots of temporary objects created when we are using the functional programming style:
The text was updated successfully, but these errors were encountered: