[GH-ISSUE #38] performance issues with wildcards #28

Closed
opened 2026-10-30 21:17:21 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @djkacevedo on GitHub (Oct 24, 2022).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/38

Originally assigned to: @DominikDoom on GitHub.

With a lot of wildcards performance drops massively.

I got it turned off for now, and works fine with regular tags.

I'm using the wildcards from the dump on https://rentry.org/sdupdates so 483.

More than a dozen slows things down, more than a couple hundred makes the webui unusable.

Originally created by @djkacevedo on GitHub (Oct 24, 2022). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/38 Originally assigned to: @DominikDoom on GitHub. With a lot of wildcards performance drops massively. I got it turned off for now, and works fine with regular tags. I'm using the wildcards from the dump on https://rentry.org/sdupdates so 483. More than a dozen slows things down, more than a couple hundred makes the webui unusable.
Author
Owner

@DominikDoom commented on GitHub (Oct 24, 2022):

I've reproduced the issue with those tags, I'll see what I can do about it.

<!-- gh-comment-id:1289658848 --> @DominikDoom commented on GitHub (Oct 24, 2022): I've reproduced the issue with those tags, I'll see what I can do about it.
Author
Owner

@DominikDoom commented on GitHub (Oct 24, 2022):

I think I found the issue:
Despite the total number of wildcards being much less than the number of tags, it caused substantial memory issues due to how they were stored. Currently, I match files to their contents with a typical key-value structure, which seems to be the issue here.

I changed wildcards to be loaded on demand instead of pre-matched to their respective files, so I could store them without keys. This makes it take minimally longer for small wildcard file counts since they're not preloaded, but it's barely noticeable and fixes the loading & performance issues for large amounts.

<!-- gh-comment-id:1289722196 --> @DominikDoom commented on GitHub (Oct 24, 2022): I think I found the issue: Despite the total number of wildcards being much less than the number of tags, it caused substantial memory issues due to how they were stored. Currently, I match files to their contents with a typical key-value structure, which seems to be the issue here. I changed wildcards to be loaded on demand instead of pre-matched to their respective files, so I could store them without keys. This makes it take minimally longer for small wildcard file counts since they're not preloaded, but it's barely noticeable and fixes the loading & performance issues for large amounts.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#28
No description provided.