Copied to clipboard

Flag this post as spam?

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


  • aman 13 posts 123 karma points
    Jan 21, 2017 @ 10:36
    aman
    0

    Performance considerations of getting content

    Hello,

    When getting content from Umbraco which approach is better for performance? Currently everything works fine, but I am considering situation after 1-5 years when after amount of content increases(which is going to be huge).

    Currently I am using following methods

    • contentService.GetContentOfContentType
    • contentTypeService.GetContentType(contentTypeAlias)

    Would it be better in terms of performance to search content and content type using XMLPath? What are performance considerations and best practices in Umbraco?

    Please share your consideration.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 21, 2017 @ 12:14
    Dirk De Grave
    101

    Hi Aman,

    Depends....

    Are you getting content for backoffice purposes? If so, there's no issue in using contentService and contentTypeService

    Or are you using these services to fetch umbraco content to display in your templates? If that's the case, hold your horses, as you shouldn't be using the aforementioned services.

    Fetching umbraco content is done differently, see https://our.umbraco.org/documentation/Reference/Querying/ for more information

    And this link is also useful: https://our.umbraco.org/documentation/Reference/Common-Pitfalls/

    Cheers,

    --Dirk

  • aman 13 posts 123 karma points
    Jan 24, 2017 @ 09:08
    aman
    0

    Thank you Dirk!

Please Sign in or register to post replies

Write your reply to:

Draft