Sk1erLLC / AutoGG

Automatically say a selected phrase after a game has ended on supported servers.
GNU General Public License v3.0
18 stars 15 forks source link

Pre-compile all regex patterns rather than on first client chat event #23

Closed solonovamax closed 3 years ago

solonovamax commented 3 years ago

All of the autogg patterns are compiled at runtime, on the first ClientChatReceivedEvent event, rather than being compiled by the RetrieveTriggersTask when they're fetched. It would be much nicer to have them compiled when they're fetched, for performance reasons.

See: AutoGGHandler#66.

Sychic commented 3 years ago

In RetrieveTriggersTask, all the patterns are compiled https://github.com/Sk1erLLC/AutoGG/blob/0a980d32ed4e3839d5f3bb4d6c0eccf693a95178/src/main/java/club/sk1er/mods/autogg/tasks/RetrieveTriggersTask.java#L41-L46

solonovamax commented 3 years ago

nvm, I'm just dumb