Code Monkey home page Code Monkey logo

Comments (3)

LiamRiddell avatar LiamRiddell commented on June 8, 2024

I ran some performance tests locally using BenchmarkDotNet. Here's the results in Release mode.

Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
StdDev : Standard deviation of all measurements
Median : Value separating the higher half of all measurements (50th percentile)
1 us : 1 Microsecond (0.000001 sec)

MJML.NET v1 - Austin

Method Mean Error StdDev
TryParseDocument 37.64 ms 2.538 ms 7.483 ms
ParseDocument 38.77 ms 2.549 ms 7.515 ms
ParseDocumentAsync 38.24 ms 2.157 ms 6.360 ms

MJML.NET v2

Method Mean Error StdDev Median
Render_Template_Amario_Beautified 1,170.1 us 52.85 us 154.18 us 1,103.5 us
Render_Template_Amario_Minified 1,065.5 us 21.23 us 54.03 us 1,053.5 us
Render_Template_ManyHeroes_Beautified 780.1 us 8.21 us 7.27 us 779.2 us
Render_Template_ManyHeroes_Minified 771.8 us 10.07 us 9.42 us 772.7 us

MJML.NET v2 - Multiple Templates

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1586 (21H1/May2021Update)
Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
DefaultJob : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Method Mean Error StdDev Median
Render_Template_Amario_Beautified 972.9 us 9.83 us 8.72 us 970.5 us
Render_Template_Amario_Minified 1,008.0 us 20.09 us 41.49 us 1,001.5 us
Render_Template_Austin_Beautified 332.7 us 6.61 us 17.06 us 327.4 us
Render_Template_Austin_Minified 355.7 us 8.50 us 25.08 us 353.0 us
Render_Template_Sphero_Beautified NA NA NA NA
Render_Template_Sphero_Minified NA NA NA NA

Sphero Failed to Compile. I'm gonna look into this.

from mjml-net.

SebastianStehle avatar SebastianStehle commented on June 8, 2024

Nice :) ... I hope you are going to push that ;)

I have analyzed that with dotTrace, but the majority of time is spent with the StringBuilder. No idea how to optimize this further.

from mjml-net.

LiamRiddell avatar LiamRiddell commented on June 8, 2024

Nice :) ... I hope you are going to push that ;)

I have analyzed that with dotTrace, but the majority of time is spent with the StringBuilder. No idea how to optimize this further.

I've created PR now. I'm gonna create new branch for the xml entity issue.

from mjml-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.