-
Notifications
You must be signed in to change notification settings - Fork 11
Performance
JPVenson edited this page Nov 25, 2021
·
9 revisions
Performance tests are tricky as they always depend on the cpu, other work that runs in background, windows settings and on and on...
Morestachio is tested with several variables.
- "Variation" is just an string that descripts the general specification of that test
- "Runs" are used to repeat the test N times to smooth outside factors like GC.
- "Model Depth" means how nested expression in that test will be created
- "SubstitutionCount" Unused
- "TemplateSize" will ensure that the template is at least a certain size
- "Token Match Time" The time of all runs the Tokenizer needed to run the template and extract token values
- "TokenizingTime" The time of all runs the Tokenizer needed to Tokenize the template
- "ParseTime" The time of all runs the Parser needed to Parse the tokens created by the Tokenizer
- "RenderTime" the time it took to render the Document by using the
CreateAsync
method without compiling first - "CompilerTime" the time the compiler took to convert the
MorestachioDocumentInfo
to an delegate by using "Compile" - "CompiledRenderTime" the time the delegate from the compiler took to render
- "Total Time" is the overall time it took to Tokenize, Parse and Render all N templates using the
CreateAsync
method.
This chart should give you an expression for whats the morestachio parts take account in:
Run at 25.11.2021 00:00
Variation | Time/Run | Runs | Model Depth | SubstitutionCount | Template Size(byte) | Token Match Time | TokenizingTime | ParseTime | RenderTime | CompilerTime | CompiledRenderTime | Total Time |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Model Depth | 00:00:00.0000787 | 5000 | 5 | 10 | 30000 | 00:00:00.1344127 | 00:00:00.3148412 | 00:00:00.0536716 | 00:00:00.0256854 | 00:00:00.0002386 | 00:00:00.0248935 | 00:00:00.5294973 |
Model Depth | 00:00:00.0000786 | 5000 | 10 | 10 | 30000 | 00:00:00.1761885 | 00:00:00.3384029 | 00:00:00.0417388 | 00:00:00.0138694 | 00:00:00.0001239 | 00:00:00.0109679 | 00:00:00.5709384 |
Model Depth | 00:00:00.0004170 | 5000 | 100 | 10 | 30000 | 00:00:01.1662047 | 00:00:02.0404841 | 00:00:00.0325790 | 00:00:00.0129852 | 00:00:00.0001007 | 00:00:00.0107659 | 00:00:03.2529526 |
Substitutions | 00:00:00.0000531 | 5000 | 5 | 10 | 30000 | 00:00:00.0955667 | 00:00:00.2217604 | 00:00:00.0321719 | 00:00:00.0123992 | 00:00:00.0001035 | 00:00:00.0102644 | 00:00:00.3624192 |
Substitutions | 00:00:00.0000534 | 5000 | 5 | 50 | 30000 | 00:00:00.0963751 | 00:00:00.2234472 | 00:00:00.0318275 | 00:00:00.0127874 | 00:00:00.0001026 | 00:00:00.0102115 | 00:00:00.3649675 |
Substitutions | 00:00:00.0000563 | 5000 | 5 | 100 | 30000 | 00:00:00.0994348 | 00:00:00.2377536 | 00:00:00.0318286 | 00:00:00.0127652 | 00:00:00.0001076 | 00:00:00.0121105 | 00:00:00.3823792 |
Template Size | 00:00:00.0000516 | 5000 | 5 | 10 | 15000 | 00:00:00.0869746 | 00:00:00.2144455 | 00:00:00.0321132 | 00:00:00.0124931 | 00:00:00.0001025 | 00:00:00.0105347 | 00:00:00.3465288 |
Template Size | 00:00:00.0000527 | 5000 | 5 | 10 | 25000 | 00:00:00.0925504 | 00:00:00.2199042 | 00:00:00.0324943 | 00:00:00.0123595 | 00:00:00.0005292 | 00:00:00.0107174 | 00:00:00.3578076 |
Template Size | 00:00:00.0000569 | 5000 | 5 | 10 | 30000 | 00:00:00.1012445 | 00:00:00.2387964 | 00:00:00.0332949 | 00:00:00.0130532 | 00:00:00.0001055 | 00:00:00.0106886 | 00:00:00.3869476 |
Template Size | 00:00:00.0001449 | 5000 | 5 | 10 | 50000 | 00:00:00.2218040 | 00:00:00.6759226 | 00:00:00.0371954 | 00:00:00.0120216 | 00:00:00.0001041 | 00:00:00.0100247 | 00:00:00.9475549 |
Template Size | 00:00:00.0001655 | 5000 | 5 | 10 | 100000 | 00:00:00.3466449 | 00:00:00.7840258 | 00:00:00.0316785 | 00:00:00.0124506 | 00:00:00.0001037 | 00:00:00.0099158 | 00:00:01.1855003 |
Run at 25.11.2021 00:00
Variation | Time/Run | Runs | Model Depth | SubstitutionCount | Template Size(byte) | Token Match Time | TokenizingTime | ParseTime | RenderTime | CompilerTime | CompiledRenderTime | Total Time |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Model Depth | 00:00:00.0000811 | 5000 | 5 | 10 | 30000 | 00:00:00.1376614 | 00:00:00.3264109 | 00:00:00.0537638 | 00:00:00.0263706 | 00:00:00.0004869 | 00:00:00.0194071 | 00:00:00.5450854 |
Model Depth | 00:00:00.0000758 | 5000 | 10 | 10 | 30000 | 00:00:00.1633159 | 00:00:00.3294524 | 00:00:00.0341665 | 00:00:00.0160631 | 00:00:00.0000956 | 00:00:00.0140500 | 00:00:00.5436085 |
Model Depth | 00:00:00.0004090 | 5000 | 100 | 10 | 30000 | 00:00:01.2137798 | 00:00:01.9985459 | 00:00:00.0331597 | 00:00:00.0138635 | 00:00:00.0000941 | 00:00:00.0117976 | 00:00:03.2600943 |
Substitutions | 00:00:00.0000529 | 5000 | 5 | 10 | 30000 | 00:00:00.0988595 | 00:00:00.2181809 | 00:00:00.0330119 | 00:00:00.0139215 | 00:00:00.0003327 | 00:00:00.0116945 | 00:00:00.3647661 |
Substitutions | 00:00:00.0000531 | 5000 | 5 | 50 | 30000 | 00:00:00.0991345 | 00:00:00.2194160 | 00:00:00.0330858 | 00:00:00.0139955 | 00:00:00.0000963 | 00:00:00.0124946 | 00:00:00.3664465 |
Substitutions | 00:00:00.0000532 | 5000 | 5 | 100 | 30000 | 00:00:00.1001773 | 00:00:00.2186767 | 00:00:00.0332864 | 00:00:00.0145998 | 00:00:00.0000934 | 00:00:00.0122244 | 00:00:00.3672864 |
Template Size | 00:00:00.0000519 | 5000 | 5 | 10 | 15000 | 00:00:00.0894992 | 00:00:00.2121224 | 00:00:00.0335966 | 00:00:00.0141823 | 00:00:00.0000933 | 00:00:00.0119632 | 00:00:00.3499153 |
Template Size | 00:00:00.0000529 | 5000 | 5 | 10 | 25000 | 00:00:00.0960801 | 00:00:00.2178529 | 00:00:00.0331966 | 00:00:00.0142883 | 00:00:00.0000947 | 00:00:00.0122838 | 00:00:00.3619447 |
Template Size | 00:00:00.0000538 | 5000 | 5 | 10 | 30000 | 00:00:00.0992442 | 00:00:00.2208791 | 00:00:00.0339512 | 00:00:00.0151053 | 00:00:00.0000937 | 00:00:00.0127135 | 00:00:00.3697862 |
Template Size | 00:00:00.0001302 | 5000 | 5 | 10 | 50000 | 00:00:00.2047166 | 00:00:00.6055590 | 00:00:00.0328079 | 00:00:00.0133600 | 00:00:00.0000926 | 00:00:00.0114916 | 00:00:00.8577033 |
Template Size | 00:00:00.0002647 | 5000 | 5 | 10 | 100000 | 00:00:00.3032777 | 00:00:01.2656462 | 00:00:00.0454502 | 00:00:00.0134248 | 00:00:00.0000952 | 00:00:00.0116681 | 00:00:01.6415875 |
Run at 25.11.2021 00:00
Variation | Time/Run | Runs | Model Depth | SubstitutionCount | Template Size(byte) | Token Match Time | TokenizingTime | ParseTime | RenderTime | CompilerTime | CompiledRenderTime | Total Time |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Model Depth | 00:00:00.0000567 | 5000 | 5 | 10 | 30000 | 00:00:00.1469828 | 00:00:00.1943722 | 00:00:00.0706935 | 00:00:00.0190623 | 00:00:00.0002092 | 00:00:00.0161729 | 00:00:00.4317276 |
Model Depth | 00:00:00.0000694 | 5000 | 10 | 10 | 30000 | 00:00:00.1812143 | 00:00:00.2596765 | 00:00:00.0695260 | 00:00:00.0184288 | 00:00:00.0001330 | 00:00:00.0150840 | 00:00:00.5294134 |
Model Depth | 00:00:00.0004119 | 5000 | 100 | 10 | 30000 | 00:00:01.0764403 | 00:00:01.9712043 | 00:00:00.0704999 | 00:00:00.0187202 | 00:00:00.0001277 | 00:00:00.0157414 | 00:00:03.1375270 |
Substitutions | 00:00:00.0000500 | 5000 | 5 | 10 | 30000 | 00:00:00.1314005 | 00:00:00.1606868 | 00:00:00.0712026 | 00:00:00.0185781 | 00:00:00.0001339 | 00:00:00.0160870 | 00:00:00.3824069 |
Substitutions | 00:00:00.0000498 | 5000 | 5 | 50 | 30000 | 00:00:00.1346363 | 00:00:00.1607785 | 00:00:00.0695000 | 00:00:00.0190069 | 00:00:00.0001341 | 00:00:00.0154963 | 00:00:00.3844726 |
Substitutions | 00:00:00.0000500 | 5000 | 5 | 100 | 30000 | 00:00:00.1328661 | 00:00:00.1618996 | 00:00:00.0707307 | 00:00:00.0184884 | 00:00:00.0001301 | 00:00:00.0160284 | 00:00:00.3848509 |
Template Size | 00:00:00.0000483 | 5000 | 5 | 10 | 15000 | 00:00:00.0985436 | 00:00:00.1543198 | 00:00:00.0695140 | 00:00:00.0184394 | 00:00:00.0001318 | 00:00:00.0160977 | 00:00:00.3413704 |
Template Size | 00:00:00.0000498 | 5000 | 5 | 10 | 25000 | 00:00:00.1219140 | 00:00:00.1613719 | 00:00:00.0698849 | 00:00:00.0187328 | 00:00:00.0001422 | 00:00:00.0155964 | 00:00:00.3724561 |
Template Size | 00:00:00.0000494 | 5000 | 5 | 10 | 30000 | 00:00:00.1312846 | 00:00:00.1593924 | 00:00:00.0697556 | 00:00:00.0187995 | 00:00:00.0001342 | 00:00:00.0158782 | 00:00:00.3797942 |
Template Size | 00:00:00.0000511 | 5000 | 5 | 10 | 50000 | 00:00:00.6624686 | 00:00:00.1682626 | 00:00:00.0699226 | 00:00:00.0181626 | 00:00:00.0001316 | 00:00:00.0150270 | 00:00:00.9194350 |
Template Size | 00:00:00.0000528 | 5000 | 5 | 10 | 100000 | 00:00:01.2193522 | 00:00:00.1779482 | 00:00:00.0687049 | 00:00:00.0183827 | 00:00:00.0001298 | 00:00:00.0151275 | 00:00:01.4850418 |
Run at 25.11.2021 00:00
Variation | Time/Run | Runs | Model Depth | SubstitutionCount | Template Size(byte) | Token Match Time | TokenizingTime | ParseTime | RenderTime | CompilerTime | CompiledRenderTime | Total Time |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Model Depth | 00:00:00.0000772 | 5000 | 5 | 10 | 30000 | 00:00:00.1396385 | 00:00:00.3006407 | 00:00:00.0561197 | 00:00:00.0296392 | 00:00:00.0002496 | 00:00:00.0230508 | 00:00:00.5268914 |
Model Depth | 00:00:00.0000797 | 5000 | 10 | 10 | 30000 | 00:00:00.1714688 | 00:00:00.3333580 | 00:00:00.0410041 | 00:00:00.0249632 | 00:00:00.0002639 | 00:00:00.0164984 | 00:00:00.5714806 |
Model Depth | 00:00:00.0004144 | 5000 | 100 | 10 | 30000 | 00:00:01.1415322 | 00:00:02.0165667 | 00:00:00.0375419 | 00:00:00.0180337 | 00:00:00.0000779 | 00:00:00.0154819 | 00:00:03.2142827 |
Substitutions | 00:00:00.0000410 | 5000 | 5 | 10 | 30000 | 00:00:00.0820135 | 00:00:00.1506398 | 00:00:00.0375980 | 00:00:00.0174014 | 00:00:00.0000767 | 00:00:00.0148899 | 00:00:00.2881215 |
Substitutions | 00:00:00.0000424 | 5000 | 5 | 50 | 30000 | 00:00:00.0866634 | 00:00:00.1566580 | 00:00:00.0378646 | 00:00:00.0180403 | 00:00:00.0000824 | 00:00:00.0156222 | 00:00:00.2997208 |
Substitutions | 00:00:00.0000417 | 5000 | 5 | 100 | 30000 | 00:00:00.0834210 | 00:00:00.1532625 | 00:00:00.0375873 | 00:00:00.0183366 | 00:00:00.0000780 | 00:00:00.0151458 | 00:00:00.2930980 |
Template Size | 00:00:00.0000402 | 5000 | 5 | 10 | 15000 | 00:00:00.0735919 | 00:00:00.1464718 | 00:00:00.0377163 | 00:00:00.0176494 | 00:00:00.0000793 | 00:00:00.0150439 | 00:00:00.2758798 |
Template Size | 00:00:00.0000416 | 5000 | 5 | 10 | 25000 | 00:00:00.0799631 | 00:00:00.1534159 | 00:00:00.0376538 | 00:00:00.0178257 | 00:00:00.0000806 | 00:00:00.0152865 | 00:00:00.2893365 |
Template Size | 00:00:00.0000414 | 5000 | 5 | 10 | 30000 | 00:00:00.0814224 | 00:00:00.1521279 | 00:00:00.0373980 | 00:00:00.0184988 | 00:00:00.0000783 | 00:00:00.0152987 | 00:00:00.2899533 |
Template Size | 00:00:00.0001399 | 5000 | 5 | 10 | 50000 | 00:00:00.1900906 | 00:00:00.6473338 | 00:00:00.0369811 | 00:00:00.0162421 | 00:00:00.0000783 | 00:00:00.0137194 | 00:00:00.8916414 |
Template Size | 00:00:00.0001431 | 5000 | 5 | 10 | 100000 | 00:00:00.2610868 | 00:00:00.6520485 | 00:00:00.0474115 | 00:00:00.0166151 | 00:00:00.0000771 | 00:00:00.0142825 | 00:00:00.9792790 |
Run on a I9-9900K