Reputation: 344
I have a website with some images using the p:graphicsimage
tag with the rendered
attribute. So the images are only shown if the bean (db query) returns a true
.
I also have a login form checking the user against a db. This works fine but my current problem is that the page needs a lot of time for loading the page(arround 25sec).
The bean method of the loginbutton is called ~20sec after pressing the loginbutton but I don't know what the server is doing during this time. Any idea how to check the server states or how to fix that problem?
My beans are ManagedBeans
Thanks in advance!
Upvotes: 0
Views: 4054
Reputation: 1662
There are a couple of things you can do to improve performance of your screens
To see if your contents are already usign gzip and cache, In your Google Chrome Browser -> right click on your screen -> inspect -> click network tab -> refresh your screen. Click on the images, icons, stylesheets and see if you see following in response header
Cache-Control:max-age=2592000
if the status of element is 304 (coming from cache)
Content-Encoding:gzip
if the status of element is 200
Upvotes: 0
Reputation: 19
You can debug your method and benchmark the potential areas very old-school like
long startTime = System.currentTimeMillis();
method();
long endTime = System.currentTimeMillis();
System.out.println((endTime - startTime) + "ms")
or use a profiler like yourkit.
Upvotes: 1