release objects from container

8 posts, 0 answers
  1. Gopinath
    Gopinath avatar
    21 posts
    Member since:
    Dec 2011

    Posted 18 Apr 2012 Link to this post

    Hello,

    In my application, we have a multiple excel upload functionality. one excel sheet basically updates/creates many BOs.

    Since we have a requirement of large no. of uploads the number of objects in the container becomes heavy and the upload is getting slower by each excel sheet.

    Do you have any recommendations for this issues or do you suggest I can release some of the objects away from the container that was already uploaded to the database to keep the container little in size.

    Please advice.

    Thanks,.
    Gopinath
    Product: Telerik ORM 2011.2.713.3
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 18 Apr 2012 Link to this post

    Hi Gopinath,

    can you just create a new ObjectContainer and apply your BO there? At the moment, only instances marked to be deleted (and deleted in the database) can be evicted from the container.

    Regards,
    Thomas
    the Telerik team
    Share your passion about the Telerik Open Access by voting for Telerik's powerful ORM tool here >>
  3. DevCraft banner
  4. Gopinath
    Gopinath avatar
    21 posts
    Member since:
    Dec 2011

    Posted 20 Apr 2012 Link to this post

    Hello,

    Thanks for your reply.

    Do you have any other suggestion to improve the performance.
  5. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 23 Apr 2012 Link to this post

    Hello,

    that is a very broad questions, and the general answer is yes. But to be more specific, your question needs to be more specific as well. If the number of instances in the ObjectContainer is too large: try to carry only the ones that you really need. Which operations are taking too much time?

    Kind regards,
    Thomas
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the OpenAccess ORM, subscribe to their blog feed now.
  6. Gopinath
    Gopinath avatar
    21 posts
    Member since:
    Dec 2011

    Posted 28 Sep 2012 Link to this post

    Hello,

    I make a service call to application server and the server returns the changeset and apply the changeset back to the container in the client.
    This happens in a loop to export multiple excel sheets. For each excelsheet, the request goes to server and returns with a changeset and then merge happens.
    At some point of upload, though server returns correct number of record, the container in the client contains only fewer records after changeset merge.
    To debug this, I created a container and applied the same change set and found that number of records are equal to what server has returned.

    Now my questions are, is it could be because the objectcontainer has some limits to maximum number ofobjects it can hold?
    please suggest me some solution for this issue.

    Thanks.
  7. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 28 Sep 2012 Link to this post

    Hello Gopinath,

    no, the ObjectContainer does not have a limitation on the number of objects it holds. If there are instances that got removed it is due to the fact that they are deleted in the database and evicted from the container.

    Kind regards,
    Thomas
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  8. Gopinath
    Gopinath avatar
    21 posts
    Member since:
    Dec 2011

    Posted 28 Sep 2012 Link to this post

    Hello Thomas.

    Thanks for your quick reply.

    I see the database has that specific record and even application server returns that record but when it merges to the container, it is missing. If i assign the same changeset to new container that i created for debug purpose, which has this record as well.

    Thanks,
    Gopi
  9. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 28 Sep 2012 Link to this post

    Hi Gopinath,

    we would like to get a small reproduction if this is possible at all. Otherwise it would be hard for us to meet your specific model like IDs and relationships / operations. Is that possible?

    Kind regards,
    Thomas
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top
DevCraft banner