2 ms·
> https://github.com/VOTEism/server/blob/d8d3752af99d7f4c25c0b1d85963d294358e1697/voteism/src/main/java/com/voteism/JwtFilter.java#L50-L60 https://github.com/VO
by koolba 6y ago
> https://github.com/VOTEism/server/blob/d8d3752af99d7f4c25c0b1d85963d294358e1697/voteism/src/main/java/com/voteism/JwtFilter.java#L50-L60 https://github.com/VOTEism/server/blob/d8d3752af99d7f4c25c0b...
Why fork threads only to immediately join on them? This is just sync code with extra context switching and fatter stack traces.
> https://github.com/VOTEism/server/blob/d8d3752af99d7f4c25c0b1d85963d294358e1697/voteism/src/main/java/com/voteism/controllers/UserController.java#L149 https://github.com/VOTEism/server/blob/d8d3752af99d7f4c25c0b...
This creates a new thread pool for each login request. That's a terrible idea. If anything create it once statically and re-use it. Or just perform your actions in the calling thread as you're just issuing a .get() on the future anyway. Again, it's needless complexity.
- votes 6y agoThanks for pointing the issue with the thread pool and will take a look.