I am trying to search using JxPath on a proto message, My proto message is
placed here
<https://gist.github.com/debraj-manna/4a8ded5d79dc9aee8d4c03d460327284>.

val protoStr =
getStringFromFile("classpath:BookingEnginePnrUpdateEventProto.txt");
val msgBld = BookingEnginePNRUpdateEvent.newBuilder();
TextFormat.getParser().merge(protoStr, msgBld);
val msgCtx = JXPathContext.newContext(msgBld.build());
System.out.println(msgCtx.getValue("//employeeId"));

I am observing that  msgCtx.getValue("//employeeId") is taking a lot of
time. Thread dumps at various points are placed in the below gist.

https://gist.github.com/debraj-manna/47852fa190075abdacd527969f355cde

If I specify the entire path like
msgCtx.getValue("/metadata/bookerInfo/traveler/userBusinessInfo/employeeId").
It is working fine.

Can someone let me know what is going wrong? Is this expected?

Reply via email to