Copied to clipboard

Flag this post as spam?

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


  • oscar olsson 8 posts 28 karma points
    May 13, 2021 @ 20:47
    oscar olsson
    0

    Modelsbuilder - performance issues - CPU raises and Memory leaks

    I have a site that works fine in local environment and in production. But when I enable ModelsBuilder:

    <add key="Umbraco.ModelsBuilder.Enable" value="true"/>
    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll"/>
    

    ...on production, then CPU goes from 5% to 60% and memory goes from 700Mb to 3Gb. And the site slows down a lot because of that.

    As soon as I disable ModelsBuilder (by remove the above settings) the site acts normal again.

    I'm using Umbraco 7.4 and Modelsbuilder (by nuget 3.0.10)

    Please help!

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 14, 2021 @ 07:01
    Dave Woestenborghs
    0

    Hi Oscar,

    Are you using the models generated by Models builder ? Because you say when you disable it your site still works.

    So why you want to enable it when appararently you are not using it.

    Dave

  • oscar olsson 8 posts 28 karma points
    May 14, 2021 @ 13:15
    oscar olsson
    0

    When Models builder is disabled the following code:

    var result = Content.Parent.Parent.FirstChild<MyGeneratedClass>();

    sets "result" to null.

    But when Modelsbuilder is enabled "result" is set to a new instance of MyGeneratedClass.

Please Sign in or register to post replies

Write your reply to:

Draft