Skip to content

Commit

Permalink
Remove explicit garbage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Dec 6, 2024
1 parent aa5de07 commit f41484e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions src/java/org/snapbackup/utilities/ZipEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ void logSkippedMsg(String msg) {
}

public void zipFile(String filePath) {
if (zipCount % 500 == 0) //attempt to address performance issues on large backups
rt.gc(); //testing not yet done to see if this improves performance
try {
file = new File(filePath);
String filename = file.getName();
Expand Down
8 changes: 1 addition & 7 deletions tools/static-analysis/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,7 @@
<tr>
<td align="center">8</td>
<td width="*%">snapbackup/src/java/org/snapbackup/utilities/ZipEngine.java</td>
<td align="center" width="5%">127</td>
<td width="*"><a href="https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_errorprone.html#donotcallgarbagecollectionexplicitly">Do not explicitly trigger a garbage collection.</a></td>
</tr>
<tr bgcolor="lightgrey">
<td align="center">9</td>
<td width="*%">snapbackup/src/java/org/snapbackup/utilities/ZipEngine.java</td>
<td align="center" width="5%">145</td>
<td align="center" width="5%">143</td>
<td width="*"><a href="https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_errorprone.html#closeresource">Ensure that resources like this BufferedInputStream object are closed after use</a></td>
</tr>
</table></body></html>

0 comments on commit f41484e

Please sign in to comment.