theigl commented on a change in pull request #437:
URL: https://github.com/apache/wicket/pull/437#discussion_r433144531
##########
File path:
wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java
##########
@@ -119,11 +119,16 @@ protected void updateAjaxAttributes(AjaxRequestAttributes
attributes)
*/
public String getEvent()
{
+ if (event.indexOf(' ') == -1)
Review comment:
@martin-g: `indexOf` is nearly 10 times faster than using `Matcher`.
```
Benchmark Mode Cnt Score Error
Units
AjaxEventBenchmarks.getEventIndexOf thrpt 5 193156786,374 ±
4206548,589 ops/s
AjaxEventBenchmarks.getEventMatcher thrpt 5 21352485,044 ±
3780313,472 ops/s
AjaxEventBenchmarks.getEventOriginal thrpt 5 6107376,960 ±
216974,067 ops/s
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]