mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Remove single unicode character from autotag query (#2363)
* Remove single unicode character from autotag query * Compile regex once where possible * Fix CPU profiling * Only match unicode characters if in path
This commit is contained in:
@@ -21,7 +21,11 @@ WHERE performers_tags.tag_id = ?
|
||||
GROUP BY performers_tags.performer_id
|
||||
`
|
||||
|
||||
const singleFirstCharacterRegex = `^[\w\p{L}][.\-_ ]`
|
||||
// KNOWN ISSUE: using \p{L} to find single unicode character names results in
|
||||
// very slow queries.
|
||||
// Suggested solution will be to cache single-character names and not include it
|
||||
// in the autotag query.
|
||||
const singleFirstCharacterRegex = `^[\w][.\-_ ]`
|
||||
|
||||
type performerQueryBuilder struct {
|
||||
repository
|
||||
|
||||
Reference in New Issue
Block a user