The concatenation function validateCascadedConstraints( context, valueContext ) consumes too much time.

Description

when validate data is json array object(contain 200 target object,when use function as follow:
private static Validator validator = null;

static {
ResourceBundleMessageInterpolator resouce = new ResourceBundleMessageInterpolator(
new PlatformResourceBundleLocator("com.huawei.bsp.remoteservice.validate.resource.ValidationMessages_en"));

validator = Validation.byDefaultProvider()
.providerResolver(new OsgiValidationProviderResolver())
.configure()
.addProperty("hibernate.validator.fail_fast", "true")
.traversableResolver(new OwnTraverseAllTraversableResolver())
.messageInterpolator(resouce)
.buildValidatorFactory().getValidator();
}

ExecutableValidator executableValidator = validator.forExecutables();

Set<ConstraintViolation<T>> validateResultSets = executableValidator.validateParameters(object, method,
parameterValues);
it cost about ten Seconds, who have good idea to Optimize performance,thanks

Environment

jvm

Attachments

1
  • 29 May 2021, 08:47 AM

duplicates

Activity

Show:

Marko Bekhta December 12, 2024 at 11:27 AM

I've kinked the mentioned issue and am going to close this one. Thanks!

jixiang832026 May 31, 2021 at 11:31 AM

the question is sloved by https://hibernate.atlassian.net/browse/HV-1831 ,thanks。

Guillaume Smet May 31, 2021 at 9:19 AM
Edited

I’m not exactly sure it’s the same issue given the information is scarce.

Could you put together a reproducer? And also share the rest of the profiler call tree, especially the methods taking a lot of time?

Thanks!

Yoann Rodière May 31, 2021 at 7:20 AM

Duplicate

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Guillaume Smet
jixiang832026
Marko Bekhta
Yoann Rodière

Components

Affects versions

Priority

Created May 29, 2021 at 8:47 AM
Updated December 12, 2024 at 11:27 AM
Resolved December 12, 2024 at 11:27 AM