There are a couple of potential issues here, in general we would need to understand more of the details of your application: https://stackoverflow.com/help/how-to-ask
I'll make some guesses though. Your logic might be triggering some sort of database (or similar) lookup, which would be the slow part. Typically, you shouldn't need to create a Shiro Subject directly, but instead use the `ShiroFilter` that manages all of this for you. If you DO need to create a subject directly, you should use the WebSubject instead of the non-web version. If you are using a ShiroFilter AND also building a Subject manually, you might be triggering multiple database actions. Let us know now you have configured Shiro and your application and we can probably help you isolate your problem. -Brian On Tue, Aug 30, 2022 at 2:28 PM Priyanka Singh <[email protected]> wrote: > Hi Team, > > Building shiro object is taking time upto 3-8 sec as the number of request > is increasing in the system. Shown below the snippet of code which is > taking time. Building the object between 2 loggers and it takes upto 3-8 > seconds as the load increases on server to build the Shiro subject. Please > help if there is any way out to improve the performance or any kind of > optimization can be done using configuration while building this object. > [image: image.png] > > Thanks, > Priyanka >
