More in this section

Forums / Developing with Sitefinity / Removing Sitefinity extra fat

Removing Sitefinity extra fat

3 posts, 0 answered
  1. Thomas
    Thomas avatar
    223 posts
    Registered:
    19 Jan 2011
    22 Nov 2011
    Link to this post
    Hi,

    I'd like to remove as many unneeded assemblies and modules as possible, such as Facebook and Twitter assemblies, Google Analytics integration, Ecommerce, etc.
    They're useless to us, make deployments longer, take up disk space, take up resources when loaded, and sometimes randomly trigger exceptions.

    I removed the Facebook and Twitter assemblies, and couldn't notice any issues.
    However, trying to remove Analytics isn't so easy. I removed all references from all config files, and removed the assemblies, but now get an exception when running the site:

    Could not load file or assembly 'Telerik.Sitefinity.Analytics.Server.Infrastructure' or one of its dependencies.


    Stack Trace:

    [FileNotFoundException: Could not load file or assembly 'Telerik.Sitefinity.Analytics.Server.Infrastructure' or one of its dependencies. The system cannot find the file specified.]
       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
       System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
       System.Reflection.Assembly.Load(String assemblyString) +28
       Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +1337
       Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError) +44
       Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.ResolveType(String name, Boolean throwOnError) +47
       Telerik.Sitefinity.Services.SystemManager.InitializeModule(ModuleSettings settings, InstallContext installContext, Boolean start) +297
       Telerik.Sitefinity.Services.SystemManager.Initialize() +1927
       Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +412
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +324
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +112
       System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
       System.Web.HttpApplication.InitModulesCommon() +80
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327


    So it seems the Analytics module is still there.
    Can anyone help?

    As for Ecommerce, I already hid the links to it a while ago, but if memory serves, it's loaded anyway. I remember this was mentioned somewhere on the forums a while ago. Can anyone remind me how to ensure it never gets loaded?

    Anything else I might want to remove?

    Thanks.

    Edit: Looks like I didn't actually remove the Facebook and Twitter DLLs, they're still there for some reason.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    25 Nov 2011
    Link to this post
    Hi Thomas,

    We have removed Facebook.dll from our references in the latest release of Sitefinity 4.3. This means that if it is still making its way to the bin folder there must be some other project referencing it in your solution. Also please note that we have started breaking down the modules into separate DLLs to prevent them from loading into memory when those modules are not used. However this is not a trivial task and cannot be completed right away. We will notify you when we are done with this.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Thomas
    Thomas avatar
    223 posts
    Registered:
    19 Jan 2011
    23 Jan 2012
    Link to this post
    Hi Radoslav,

    I still couldn't remove Facebook.dll. It kept coming back due to a pre-build event I put in place, but if I actually remove it, I get an exception on application startup (ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.).

    While waiting for a future Sitefinity version that will make the situation better, is there anything I can do to reduce the number of loaded assemblies?

    Thanks.

    Edit: I read that Facebook.dll was removed from SF 4.4, but we're still on 4.3.
3 posts, 0 answered