Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lee 1130 posts 3088 karma points
    Jul 15, 2010 @ 12:19
    Lee
    0

    Most Efficient Way To Create Lots Of Nodes?

    I am just finishing v1.1 of my importer package, and notice all that creating the each nodes take A LOT longer than inserting 100's of comments!

    What is the most efficient/quickest way to add nodes/content via the API?

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jul 15, 2010 @ 16:38
    Tim
    0

    Good question, I'd quite like to know this one myself!

    In 4.5 I think there's an optimised mode you can set when creating documents that limits the amount of DB queries. @slace would be the best person to answer this one I think.......

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jul 16, 2010 @ 00:52
    Aaron Powell
    0

    Due to the design of the data layer there is no way to handle the inserting of 100's of nodes at any single time.

    Umbraco was never designed with that kind of bulk data import in mind so unfortunately it's something that we've just got to live with at the moment.

    Most of the improvements in the data layer in 4.5 are with retrieving data, as that is what is done most in the CMS.

  • Lee 1130 posts 3088 karma points
    Jul 16, 2010 @ 07:17
    Lee
    0

    Ok thanks for the clarification Aaron :)  Shame though as most big clients want their data exported from old CMS and imported into new the one (Hence why CMSImport has been so popular)

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 16, 2010 @ 08:08
    Sebastiaan Janssen
    0

    I must add that Umbraco handles creating lots of nodes through the api very, very well. I wrote a custom importer a few months ago to get about 20 000 nodes into Umbraco and it sure took a while (in part because of the extra eventhandlers that I added to the aftersave event). But does speed really matter? I just started with a testrun of a 1000 and when everything looked good, the rest of it I left for an overnight job, to find that ot worked flawlesly the next day.

  • Lee 1130 posts 3088 karma points
    Jul 16, 2010 @ 08:47
    Lee
    0

    I have just run my code on a live server for a screen cast and its actually pretty fast, maybe the lag was down to my local machine - But speed does matter if you are creating a package that does a lot of importing/creating or it'll timeout while they are using it

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jul 16, 2010 @ 10:02
    Tim
    0

    I have noticed that the speed of the machine the installation lives on makes a HUGE difference. The dev box at my client's is a fairly crummy virtual machine, and it takes AGES to publish a lot of nodes. Ran a similar import on the same site on the live box (which is considerably meatier), and it ran in 10 minutes or so instead of nearly an hour.

    If I'm doing a really big custom import, I've started creating an exe file and getting it to talk to base to do the import, as that won't time out if it takes ages.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 16, 2010 @ 13:44
    Sebastiaan Janssen
    0

    I thought base was only for querying, not for create/update?

    I've not ran into timeout problems at all, I just import items one by one, I just do a lot of Response.Flush() which I believe will restart the timeOut counter.

Please Sign in or register to post replies

Write your reply to:

Draft