pablobm left a comment (openstreetmap/openstreetmap-website#6612)

Not sure it's enough for a timeout, but I can confirm that in the `key=value` 
patterns, the `\p{Word}` ones are running about 10x slower than similar `\w` 
ones (just as a comparison, I know they are not the same). These are some 
numbers, taken from running `test/models/diary_entry_test.rb` in my computer:

```
 11us - 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\w]+)=(?<value>[-+,.:;'%()\/\w]+)/i
116us, 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\p{Word}]+)=(?<value>[-+,.:;'%()\/\p{Word}]+)/i

 11us 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\w]+)=(?<value>[-+,.:;'%()\/\w]+)/i
116us, 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\p{Word}]+)=(?<value>[-+,.:;'%()\/\p{Word}]+)/i

 24us 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\w]+)=(?<value>[-+,.:;'%()\/\w]+)/i
236us 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\p{Word}]+)=(?<value>[-+,.:;'%()\/\p{Word}]+)/i

 32us 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\w]+)=(?<value>[-+,.:;'%()\/\w]+)/i
302us 
/(?<=^|[^\w!#$%&'*+,.\/:;=?@_~^\-])(?<key>[-+,.:;'%()\p{Word}]+)=(?<value>[-+,.:;'%()\/\p{Word}]+)/i
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6612#issuecomment-3675875126
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6612/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to