RebuildTree rebuilds the prefix tree from the previously registered routes. This method is useful when you want to register routes dynamically after the app has started. It is not recommended to use this method on production environments because rebuilding the tree is performance-intensive and not t
()
| 819 | // Latest benchmark results showed a degradation from 82.79 ns/op to 94.48 ns/op and can be found in: |
| 820 | // https://github.com/gofiber/fiber/issues/2769#issuecomment-2227385283 |
| 821 | func (app *App) RebuildTree() *App { |
| 822 | app.mutex.Lock() |
| 823 | defer app.mutex.Unlock() |
| 824 | |
| 825 | return app.buildTree() |
| 826 | } |
| 827 | |
| 828 | // buildTree build the prefix tree from the previously registered routes |
| 829 | func (app *App) buildTree() *App { |