[SITE-5266] perf: Move kint-php/kint to dev dependencies to eliminate production overhead #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves from runtime dependencies () to development dependencies () to eliminate significant performance overhead in production environments.
Problem
Kint is currently loaded on every request in production, causing:
This overhead occurs because Kint's file automatically parses and files to look for configuration, which happens during Composer's autoload process on every request.
Solution
Impact
Production (with )
✅ Eliminates ~27ms + 3MB overhead per request
✅ No functionality loss (Kint shouldn't be in production)
✅ Faster page loads and reduced memory usage
Development (with dev dependencies)
✅ Kint remains fully available for debugging
✅ No breaking changes to development workflow
✅ All existing functionality preserved
Testing
Performance Evidence
This change addresses a performance bottleneck identified via XDebug profiling where Kint's JSON parsing of composer metadata was consuming significant resources on every request before any application-level caching could help.
Breaking Changes
None for typical usage. Only affects environments that:
Such usage would be incorrect anyway as debugging tools shouldn't be used in production.