The bot interns game names here. This won't actually matter for what we use the bot for because we don't have a spam problem; but this is a bad idea because keywords are not garbage collected, so if people enter and remove a lot of game names it will leak memory. I would suggest just using the raw strings as map keys instead.
https://git.libregaming.org/LibreGaming/matchbot/src/commit/856432516c7ee17b0cfbe8ea008f6d2b9d72e088/src/bot.clj#L11
The bot interns game names here. This won't actually matter for what we use the bot for because we don't have a spam problem; but this is a bad idea because keywords are not garbage collected, so if people enter and remove a lot of game names it will leak memory. I would suggest just using the raw strings as map keys instead.
I think this can be done as a non-breaking change, as the keys are stored as regular strings in serialised JSON when at rest. Thus, we would need only to remove the function that you referenced and unset the key-fn function in 856432516c/src/system.clj (L22) in order to change this behaviour.
I think this can be done as a non-breaking change, as the keys are stored as regular strings in serialised JSON when at rest. Thus, we would need only to remove the function that you referenced and unset the `key-fn` function in https://git.libregaming.org/LibreGaming/matchbot/src/commit/856432516c7ee17b0cfbe8ea008f6d2b9d72e088/src/system.clj#L22 in order to change this behaviour.
seabass
added this to the 1.0.1 milestone 1 year ago
856432516c/src/bot.clj (L11)
The bot interns game names here. This won't actually matter for what we use the bot for because we don't have a spam problem; but this is a bad idea because keywords are not garbage collected, so if people enter and remove a lot of game names it will leak memory. I would suggest just using the raw strings as map keys instead.
I think this can be done as a non-breaking change, as the keys are stored as regular strings in serialised JSON when at rest. Thus, we would need only to remove the function that you referenced and unset the
key-fn
function in856432516c/src/system.clj (L22)
in order to change this behaviour.Resolved in pull request #6.