Skip to content

Commit

Permalink
perf: optimize GitLab client HTTP engine configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
filipowm committed Apr 1, 2022
1 parent 7f6c7af commit f1fca47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ class GitLabApiBuilder internal constructor() {
return HttpClient(CIO) {
engine {
this.threadsCount = clientThreadsCount
this.maxConnectionsCount = 1500
endpoint {
keepAliveTime = 10000
maxConnectionsPerRoute = 200
pipelineMaxSize = 25
}
}
defaultRequest {
this.url.takeFrom(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ProjectEntityRepository : PagingAndSortingRepository<ProjectEntity, Lo

@QueryHints(value = [
QueryHint(name = HINT_CACHEABLE, value = "false"),
QueryHint(name = HINT_FETCH_SIZE, value = "" + Integer.MIN_VALUE),
QueryHint(name = HINT_FETCH_SIZE, value = "100"),
])
@Query("SELECT p FROM ProjectEntity p WHERE p.subscribed = true")
fun streamAllForAnalysis(): Stream<ProjectEntity>
Expand Down

0 comments on commit f1fca47

Please sign in to comment.