• Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 5.4.5
    • Components: hibernate-core
    • Labels:
    • backPortable:
    • Last commented by a user?:
    • Sprint:


      Opening a new Session has become quite resource intensive: several configuration properties are being duplicated and parsed, and it turns out most of these operations are going to be the same for all Session instances when opened with the default settings.

      This can be improved in various ways; I'm planning to introduce a new component to be layered between the SessionFactory and the Session instances. In terms of roles this is similar to the SessionBuilder, except that the builder is by its nature unique for each Session and is collecting settings which make a Session unique - while the new component (planned to be called FastSessionServices ) is having a design emphasis on the immutable state to be shared across all Sessions (unless they use special flags to diverge).

      Such new component can als be used to cache / prepare frequently looked up elements from the SessionFactory, such as particularly hot Services or anything similarly threadsafe, unique.

      Configuration properties of a Session also need to be called out: literally having to parse Map<String, Object> props at each session open is not great for performance; not least each session is having its own copy of such properties, while we could use a copy-on-write approach to share the default settings among all sessions.




            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: