Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 858295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:31:32+00:00 2026-05-15T08:31:32+00:00

In my Java SE application I used Hibernate 3.3.2 and creating the SessionFactory took

  • 0

In my Java SE application I used Hibernate 3.3.2 and creating the SessionFactory took about 5 seconds.

Today I updated to Hibernate 3.5.1 and suddenly it takes over a minute.

What can be the cause of such a dramatic effect?

I tried different things the better part of the day and I have no clue…

Some data I collected

  • According to the profiler the most time is spent in PersisterFactory.createClassPersister and in that method ProxyFactory.createClass takes the most time.
  • The log shows nothing unusual
  • Changing hibernate.bytecode.use_reflection_optimizer makes no difference
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:31:32+00:00Added an answer on May 15, 2026 at 8:31 am

    OK, this was absolutely stupid and had nothing to do with Hibernate at all, but I’ll answer that question anyway, because it might prevent others to do the same mistakes.

    1. Creating the SessionFactory in Hibernate 3.5 is not slower.
    2. When creating the SessionFactory there are thousands of methods calls in order to initialize Hibernate.
    3. Each of these method calls seem to produce a small overhead for the profiler and the debugger. Also the JIT compiler is disabled during debugging.
    4. The first time I noticed the slowness I was single-stepping through the code and all subsequent tests were done using a profiler.
    5. I only noticed that because in frustration I just ran the application without any intent to further track down the problem.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.