Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DMI datasource with lookupStyle="factory"

    I switched our DMI datasource to be lookupStyle="factory" with hopes of reducing object creation on the server side. I thought that using the factory style would cause the server side code to make a "static" call into the factory to get the datasource instance.

    This would be exactly what we wanted since our datasources are basically singletons since they contain no state and 1 instance of each datasource can server all the client requests.

    Turns out the factory style does not call a static method but rather creates an instance of the factory to call a the create method on. So even with "factory" the server is creating a new factory object every time.

    Any suggestions on how to prevent all this object creation (which in our case is not needed at all)?

    Thanks

    #2
    Make sure to focus on profiling to optimize. Your changes to switch to factory mode may have made a performance difference in your app, however, trying to eliminate the creation of an instance of your factory class, which presumably does next to nothing on init, almost certainly has no performance benefit.

    Comment

    Working...
    X