Spring Security slow startup
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- groovy, java, spring, spring-boot
- 領域
- backend, performance
調査の方向性
Start by profiling application-context initialization with Spring Security enabled and disabled, focusing on bean pre-instantiation, EventListenerMethodProcessor, AnnotationsScanner, and class loading. Compare JFR data and bean timing around doWithSpring(), then identify the exact blocking call or bean factory phase responsible for the roughly 8.4-second pause. Done means the responsible initialization work is identified and a reproducible improvement or explanation is established.
索引モデルが issue の本文から書いたものです。
説明
Expected Behavior
Spring Security adds a long pause during application startup
Environment
- Grails: 8.0.0-RC1
- Spring Boot: 4.1.1
- Spring Framework: 7.0.9
- Java: 25.0.4.1
- Profile:
development
Observed behavior
Startup pauses for several seconds after these messages:
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security LDAP ...
... finished configuring Spring Security LDAP
In a baseline run, the first datasource initialization log appeared about 8.4 seconds after the application startup log. Spring Boot reported a total startup time of 11.849 seconds.
Disabling all Spring Security removes the pause. Disabling LDAP alone does not, suggesting that the delay is associated with Spring Security Core or work it triggers later in Spring context initialization.
Investigation
The plugin configuration itself does not appear to account for the delay.
doWithSpring()took about 76 ms for Spring Security Core.doWithSpring()took less than 1 ms for LDAP.
A temporary bean timing probe recorded 587 beans. The slowest intervals were mostly Grails and framework initialization:
servletContainer: about 2.45 s- Grails URL mapping and Hibernate metadata bean chain: about 2.3–2.4 s
grailsSimpAnnotationMethodMessageHandler: about 0.91 sgroovyPagesTemplateEngine: about 0.55 sgspTagLibraryLookup: about 0.54 s
These bean intervals include dependency creation and overlap, so they must not be added together.
Individual Spring Security beans were comparatively fast:
- Authentication filter: about 31 ms
- LDAP authentication provider: about 16 ms
- LDAP authenticator: about 8 ms
- LDAP context source: about 6 ms
No LDAP network wait was observed during startup.
JFR evidence showed activity around:
- Spring bean pre-instantiation
EventListenerMethodProcessor/AnnotationsScanner- Class loading
- Grails/Hibernate metadata initialization
This suggests that the pause occurs during broader application-context initialization rather than in the plugin's printed configuration methods, but the exact blocking call has not yet been identified.
Configuration comparison
The controller annotations were replaced with a centralized InterceptUrlMap containing equivalent role rules.
This did not materially improve startup.
Before the change
- Total startup time: 11.849 s
- Application startup → first datasource initialization: about 8.405 s
With the final URL-map configuration
- Total startup time: 11.812 s
- Application startup → first datasource initialization: about 8.349 s
Other post-change runs ranged from 11.997 s to 12.366 s total.
The small difference is within run-to-run variation. The pause remains at about 8.4 seconds.
Current assessment
Spring Security is correlated with the delay, but no individual Spring Security bean or Core/LDAP configuration method accounts for several seconds.
The evidence points to initialization work triggered or made eager when Spring Security is enabled.
Further profiling is needed to identify the exact call or bean factory phase responsible.
Actual Behaviour
No response
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
Grails 8.0.0-RC1
- 主要言語
- Groovy
- スター
- 2.9k
- フォーク
- 976
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 174
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/grails-core のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
apache/grails-core#16635 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/grails-core#16289 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/grails-core#15764 ·
メンテナーはふだん 1 日以内に返信
-
Update documentation for Java 25対応中かも @ruthst00 が 9 日前に担当しました。 オープンrelates-to: documentation weekly-action-item
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/grails-core#15725 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
apache/grails-core#16634 ·
メンテナーはふだん 1 日以内に返信
apache/grails-core の issue をすべて見る
似ている issue
-
from-review-extraction python severity:nit
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
LearningCircuit/local-deep-research#7461 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[Cleanup] Include the public header in work_split.cpp対応中かも @blozano-tt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tenstorrent/tt-metal#60850 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
puppe1990/amarra-cais#355 ·
メンテナーはふだん 1 日以内に返信
-
area: import-export bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
amatya-aditya/obsidian-rss-dashboard#1191 ·
メンテナーはふだん 1 日以内に返信