Very slow response of jackson library in Java spring hibernate MVC framework

Viewed 1524

I created restful web service using spring hibernate MVC which return JSON as the response. I am using Jackson library for this. I am creating json from a bean class and I am using hibernate approach to fetch data from MySQL server.

There are near about 20 attributes in my bean class. The problem is when there is less record say 50-100, its response time is very fast i.e. within a second, but when records are increased like 500 or more than it takes lots of time to parse from a bean to JSON i.e. up to 25-30 seconds, However, hibernate - MySQL response is still very fast.

I have deployed this web service on the local machine (i7 8 GB ram, window 7) on tomcat 7. What is going wrong with jackson? Any help would be appreciated.

1 Answers
Related