Copied to clipboard

Flag this post as spam?

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


  • Simon Yohannes 55 posts 182 karma points
    Jan 26, 2019 @ 19:26
    Simon Yohannes
    0

    [performance] typed media calls making database queries

    i've been profiling my website today and have seen a lot of these type of entries:

    <ExecuteScalarWithRetry>b__0 ExecuteAction ExecuteScalar GetIdForKey GetIdForKey TypedMedia TypedMedia ConvertSourceToObject get_Value GetValue GetPropertyValue Execute ExecutePageHierarchy ExecutePageHierarchy Render RenderViewResultAsString Execute LoadPartialViewMacro renderMacro RenderMacro Execute ExecutePageHierarchy ExecutePageHierarchy Render
    DECLARE @0 nvarchar(40) = N'73de290c-3375-4a09-94f1-5811542af6bd',
            @1 nvarchar(40) = N'b796f64c-1f99-4ffb-b886-4bf4bc011a9c',
            @2 nvarchar(40) = N'92849b1e-3904-4713-9356-f646f87c25f4';
    
    SELECT id FROM umbracoNode WHERE uniqueId=@0 AND (nodeObjectType=@1 OR nodeObjectType=@2)
    

    it appears to be a lookup for the integer ID of a media item, given its GUID, this i can tell by executing the sql query and also the GetIdForKey method is being called. these db calls are really slowing things down so i'm wondering why this is necessary at all? why can't the GUID be used directly to lookup media, since it seems that the GUID is stored inside the examine index anyway?

    maybe i'm misunderstanding why this happens but if anybody could explain why this is happening and/or how to avoid this or optimise, that would be great.

    thanks, Simon

  • Simon Yohannes 55 posts 182 karma points
    Feb 01, 2019 @ 16:19
    Simon Yohannes
    0

    anybody familiar with the umbraco core that can shed some light on this??

    thanks,

    Simon

Please Sign in or register to post replies

Write your reply to:

Draft