-
Notifications
You must be signed in to change notification settings - Fork 0
Reducing Threads #29
Reducing Threads #29
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -62,7 +62,7 @@ | |||||
| MediaCategoryModel mediaSerieCategory = mediaCategoryService.findById(SERIE_ID).orElseThrow(() -> new GenericException("Category not found")); | ||||||
| MediaCategoryModel mediaAnimeCategory = mediaCategoryService.findById(ANIME_SERIE_ID).orElseThrow(() -> new GenericException("Category not found")); | ||||||
| MediaCategoryModel mediaUndefinedCategory = mediaCategoryService.findById(UNDEFINED_MEDIA_ID).orElseThrow(() -> new GenericException("Category not found")); | ||||||
| ExecutorService executorService = Executors.newFixedThreadPool(400); | ||||||
| ExecutorService executorService = Executors.newFixedThreadPool(5); | ||||||
|
Check warning on line 65 in src/main/java/com/espacogeek/geek/data/impl/SerieControllerImpl.java
|
||||||
|
||||||
| ExecutorService executorService = Executors.newFixedThreadPool(5); | |
| ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); |
Check warning on line 99 in src/main/java/com/espacogeek/geek/data/impl/SerieControllerImpl.java
GitHub Actions / Qodana for JVM
Constant values
Condition `externalReferenceExisted.isPresent()` is always `false`
Check warning on line 121 in src/main/java/com/espacogeek/geek/data/impl/SerieControllerImpl.java
GitHub Actions / Qodana for JVM
Result of method call ignored
Result of `ExecutorService.awaitTermination()` is ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reducing the thread pool from 400 to 5 threads may significantly impact performance if updateTitles() processes a large number of items concurrently. This 98.75% reduction in parallelism could create a bottleneck. Consider benchmarking this change or using a value based on available CPU cores (e.g., Runtime.getRuntime().availableProcessors()) to balance resource usage and throughput.