-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Michael Hunger opened SPR-9528 and commented
We have a customer who generated a lot of Spring Data Repositories, the startup time of his application was very long due to that (40 seconds).
When profiling I saw that most of the time was spent in ASM reading the files. As I know ASM to be very fast I looked into the issue and saw
that SimpleMetadataReader
doesn't wrap the input stream in a BufferedInputStream
. So I tried it in a copy of SimpleMetadataReader
and startup time halved from 40s to 20s.
{CODE}
SimpleMetadataReader(Resource resource, ClassLoader classLoader) throws IOException {
InputStream is = new BufferedInputStream(resource.getInputStream());
{CODE}
Sub-tasks:
- Backport "Use BufferedInputStream in SimpleMetaDataReader to double performance" [SPR-9554] #14188 Backport "Use BufferedInputStream in SimpleMetaDataReader to double performance"
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement