Closed ikdekker closed 1 year ago
Making all these separate notifications is not the most efficient. Many of them loop through summoners, with simple checks being done.
To me it would make sense to accumulate data, or create a different structure for adding embeds.
Now we do:
And since almost all embed context is the same (summoner, queuename...) we can add this in one template as well. So it'd be something like:
We could then remove the need for creating a class for each new notification (if it is one of the "trivial" existing types).
So, instead of "registering" the team notification checkers: https://github.com/freshcoders/discorki/blob/87656c209df6e9ec3668f5299cc70c51f3d78efd/src/main/java/com/alistats/discorki/tasks/CheckMatchFinishedTask.java#L31 We would just run some wrapper loops.
Ill update on this later, to see if it actually makes sense to make the effort
Making all these separate notifications is not the most efficient. Many of them loop through summoners, with simple checks being done.
To me it would make sense to accumulate data, or create a different structure for adding embeds.
Now we do:
And since almost all embed context is the same (summoner, queuename...) we can add this in one template as well. So it'd be something like:
We could then remove the need for creating a class for each new notification (if it is one of the "trivial" existing types).
So, instead of "registering" the team notification checkers: https://github.com/freshcoders/discorki/blob/87656c209df6e9ec3668f5299cc70c51f3d78efd/src/main/java/com/alistats/discorki/tasks/CheckMatchFinishedTask.java#L31 We would just run some wrapper loops.