+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Pre-compiling website not helping performance

Pre-compiling website not helping performance

4 posts, 0 answered
  1. Clarence
    Clarence avatar
    7 posts
    Registered:
    03 Jun 2015
    15 Jun
    Link to this post

    In an effort to make the "first hit" of the site bearable, I am looking to implement the pre-compiler provided by Progress.

     http://docs.sitefinity.com/for-developers-sitefinity-precompiler-tool

     

    However when I run the exe I am actually seeing worse behavior.

    Scenario 1:
    +Deploy site
    + Launch site, get gears.
    + Hit major web pages to make them "live" and "compiled"

    Hits past this work great.

    Scenario 2
    + Deploy site
    + Run EXE with proper parameters and wait for it to finish
    EXPECTED RESULTS: Site launches immediately for users and at the speed of a compiled site.
    ACTUAL RESULTS: Site loads to the gears and pages take even longer to load for the first time.

     

    One note is that I am getting some errors from the compiler...  Command line results attached (well, I attempted to attach.. kept getting an error, so it is pasted below) with some info removed for privacy.

    ==================================================

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    D:\Tasks\tasks\PreCompile>Telerik.Sitefinity.Compiler.exe /url="http:
    //example.com" /appdir="D:\websites\example" /authKey="MY_AUTH_KEY" /strategy="Frontend"
    Telerik.Sitefinity.Compiler.exe Information: 0 : Preparing application for preco
    mpile..
    Telerik.Sitefinity.Compiler.exe Information: 0 : Waiting for site to start..
    Telerik.Sitefinity.Compiler.exe Information: 0 : Acquiring markup..
    Telerik.Sitefinity.Compiler.exe Information: 0 : Acquiring markup for Pages - 0.
    00 %. Time elapsed 00:00:00
    Telerik.Sitefinity.Compiler.exe Information: 0 : Acquiring markup for Pages - 90
    .91 %. Time elapsed 00:00:03
    Telerik.Sitefinity.Compiler.exe Information: 0 : Acquiring markup for Pages - 10
    0.00 %. Time elapsed 00:00:04
    Telerik.Sitefinity.Compiler.exe Information: 0 : Initiating compilation..
    Telerik.Sitefinity.Compiler.exe Information: 0 : Generating source for assembly
    Telerik.Sitefinity.PrecompiledPages.Frontend.0..
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/39A6C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/9FA6C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/C4A6C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/ECA6C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/14A7C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/39A7C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/30A8C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/B4A8C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/B4B3C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/B7C3C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Error: 0 : Generating source for the virtualPath
     ~/SFMVCPageService/2FC9C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.
    Telerik.Sitefinity.Compiler.exe Information: 0 : Compiling assembly Telerik.Site
    finity.PrecompiledPages.Frontend.0..
    Telerik.Sitefinity.Compiler.exe Information: 0 : Successfully compiled assembly
    Telerik.Sitefinity.PrecompiledPages.Frontend.0.
    Telerik.Sitefinity.Compiler.exe Information: 0 : Done

  2. Clarence
    Clarence avatar
    7 posts
    Registered:
    03 Jun 2015
    15 Jun
    Link to this post

    Here is the error from t

    06/15/2016 11:15:50
    Type : System.ArgumentNullException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Value cannot be null.
    Parameter name: source
    Source : System.Core
    Help link :
    ParamName : source
    Data : System.Collections.ListDictionaryInternal
    TargetSite : System.Collections.Generic.IEnumerable`1[TResult] Select[TSource,TResult](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,TResult])
    HResult : -2147467261
    Stack Trace :    at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
       at Telerik.Sitefinity.Web.Compilation.Services.MarkupGeneratorService.Post(PageMarkupRequest request)
       at lambda_method(Closure , Object , Object )
       at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object instance, TRequest requestDto)

    Additional Info:

    MachineName : ServerNameGoesHere
    TimeStamp : 6/15/2016 3:15:50 PM
    FullName : Telerik.Sitefinity.Utilities, Version=9.0.6013.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
    AppDomainName : /LM/W3SVC/9/ROOT-5-131104772952796787
    ThreadIdentity :
    WindowsIdentity : IIS APPPOOL\example.com
    Requested URL : http://example.com/restapi/markup/pages


    Category: ErrorLog

    Priority: 0

    EventId: 90000

    Severity: Error

    Title:Enterprise Library Exception Handling

    Machine: ServerNameGoesHere

    App Domain: /LM/W3SVC/9/ROOT-5-131104772952796787

    ProcessId: 8000

    Process Name: c:\windows\system32\inetsrv\w3wp.exe

    Thread Name:

    Win32 ThreadId:7656

    Extended Properties:

  3. Clarence
    Clarence avatar
    7 posts
    Registered:
    03 Jun 2015
    17 Jun
    Link to this post
    Hello?
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    05 Dec 2016
    24 Jun
    Link to this post
    Hi,

    The precompilation must save the time consumed by the csharp compiler to compile every page to a class before rendering it. The precompiler encounters a problem and doesn`t precompile pages due to a problem retrieving the markup of pages.

    The precompiler encounters an error when accessing pages, the error identifies it.
    Generating source for the virtualPath
     ~/SFMVCPageService/C4A6C913-DFEE-6E9C-B83E-FF000058B200_notheme.aspx failed. Th
    is page will not be precompiled. Actual error is: Exception has been thrown by t
    he target of an invocation.

    From the error it is not clear what part of the page: a widget, something on the template, etc... is causing this, but to test it run the precompiler for a small set of pages if applicable (the pages that the precompiler query can be defined creating a custom precompiler strategy following this documentation).
    Run it against one page for example and if it fails start removing widegts from the page untill the precompiler can compile the page, the last removed page component will be the cause for the failure.

    Send me info on the components that breaks precompilation to check how to fix it.

    Regards,
    Stanislav Velikov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered