LorittaBot / Loritta

💁 A multipurpose, multilanguage, customizable, modular, and very cute bot for Discord! ~Making your server more awesome~
https://loritta.website/
GNU Affero General Public License v3.0
669 stars 170 forks source link

Optimize exception generation during command execution #2670

Closed SrGaabriel closed 1 week ago

SrGaabriel commented 1 week ago

Removes stack trace generation, cause & suppression tracking and message storage from exceptions

This increases the performance of command failure (context.fail) by ~16-20 times.

Sources: https://mattwarren.org/2016/12/20/Why-Exceptions-should-be-Exceptional/ https://www.baeldung.com/java-exceptions-performance