{"id":15421660,"url":"https://github.com/jstedfast/mimeparserbenchmark","last_synced_at":"2025-04-19T15:33:59.280Z","repository":{"id":32981828,"uuid":"36606839","full_name":"jstedfast/MimeParserBenchmark","owner":"jstedfast","description":"Benchmark for popular MIME parsers for .NET","archived":false,"fork":false,"pushed_at":"2024-05-20T12:24:02.000Z","size":6324,"stargazers_count":8,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T09:23:18.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mui-org/material-ui","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jstedfast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-31T14:33:38.000Z","updated_at":"2023-09-02T21:09:00.000Z","dependencies_parsed_at":"2024-10-20T17:19:42.151Z","dependency_job_id":null,"html_url":"https://github.com/jstedfast/MimeParserBenchmark","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":0.5714285714285714,"last_synced_commit":"1bcdc0ac113f66f6ff55d16f1d6fd181ca31ba1b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstedfast%2FMimeParserBenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstedfast%2FMimeParserBenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstedfast%2FMimeParserBenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstedfast%2FMimeParserBenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstedfast","download_url":"https://codeload.github.com/jstedfast/MimeParserBenchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249220841,"owners_count":21232421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T17:35:29.278Z","updated_at":"2025-04-16T08:33:00.873Z","avatar_url":"https://github.com/jstedfast.png","language":"C#","readme":"# MimeParserBenchmark\n\nThis project benchmarks various .NET MIME parsers for comparison purposes.\n\n## Package Versions\n\n| Package                                                                | Version                                                                             |\n|-----------------------------------------------------------------------:|:-----------------------------------------------------------------------------------:|\n| \u003ca href=\"https://github.com/jstedfast/MimeKit\"\u003eMimeKit\u003c/a\u003e             | \u003ca href=\"https://www.nuget.org/packages/MimeKit/3.0.0\"\u003e3.0.0\u003c/a\u003e                    |\n| \u003ca href=\"https://www.limilabs.com/mail\"\u003eLimiLabs' Mail.dll\u003c/a\u003e         | \u003ca href=\"https://www.nuget.org/packages/Mail.dll/3.0.21294.1630\"\u003e3.0.21294.1630\u003c/a\u003e |\n| \u003ca href=\"http://www.mime4.net/\"\u003eMime4Net\u003c/a\u003e                           | \u003ca href=\"https://www.nuget.org/packages/NI.Email.Mime/1.8.1\"\u003e1.8.1\u003c/a\u003e              |\n| \u003ca href=\"https://github.com/andyedinborough/aenetmail\"\u003eAE.Net.Mail\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AE.Net.Mail/1.7.10\"\u003e1.7.10\u003c/a\u003e              |\n| \u003ca href=\"https://github.com/pmengal/MailSystem.NET\"\u003eMailSystem.NET\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/MailSystem.NET/2.0.1\"\u003e2.0.1\u003c/a\u003e             |\n| \u003ca href=\"https://github.com/foens/hpop\"\u003eOpenPOP.NET\u003c/a\u003e                | \u003ca href=\"https://www.nuget.org/packages/OpenPop.NET/2.0.6.1120\"\u003e2.0.6.1120\u003c/a\u003e      |\n\n## Runtime\n\n```\nIntel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores\n  [Host]     : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT\n  DefaultJob : .NET Framework 4.8 (4.8.4420.0), X64 RyuJIT\n```\n\n## Results\n\n### HeavyHeaderEmailBenchmark\n\nIn this benchmark, each library is used to parse an in-memory email message that is almost all headers 1,000 times.\n\n|            Method |        Mean |     Error |    StdDev |\n|------------------ |------------:|----------:|----------:|\n|           MimeKit |    30.22 ms |  0.207 ms |  0.183 ms |\n| MimeKitPersistent |    30.08 ms |  0.311 ms |  0.276 ms |\n|          LimiLabs |   629.92 ms |  3.252 ms |  2.883 ms |\n|          Mime4Net |   517.56 ms |  3.442 ms |  3.051 ms |\n|           OpenPOP |   353.23 ms |  4.355 ms |  4.074 ms |\n|         AENetMail | 2,862.46 ms | 17.677 ms | 16.535 ms |\n|     MailSystemNET | 1,911.98 ms | 11.197 ms | 10.474 ms |\n\n### JwzMboxBenchmark\n\nIn this benchmark, each library is used to parse the `jwz.mbox` Unix mbox spool from disk 10 times.\n\n|            Method |       Mean |   Error |  StdDev |\n|------------------ |-----------:|--------:|--------:|\n|           MimeKit |   171.3 ms | 0.87 ms | 0.77 ms |\n| MimeKitPersistent |   160.1 ms | 1.50 ms | 1.33 ms |\n|          LimiLabs | 1,148.3 ms | 8.28 ms | 7.75 ms |\n\n### StarTrekEmailBenchmark\n\nIn this benchmark, each library is used to parse `startrek.eml` from disk 1,000 times.\n\n|            Method |        Mean |    Error |   StdDev |\n|------------------ |------------:|---------:|---------:|\n|           MimeKit |    218.6 ms |  1.95 ms |  1.73 ms |\n| MimeKitPersistent |    205.5 ms |  1.72 ms |  1.61 ms |\n|          LimiLabs |  2,318.0 ms | 12.37 ms | 10.96 ms |\n|          Mime4Net | 10,726.6 ms | 38.19 ms | 35.73 ms |\n|           OpenPOP |          NA |       NA |       NA |\n|         AENetMail |  3,897.4 ms | 74.18 ms | 69.39 ms |\n|     MailSystemNET |  8,928.0 ms | 29.92 ms | 26.53 ms |\n\nNotes:\n* MailSystem.NET's parser only supports parsing from byte[] or MemoryStream, so in this test,\n  MailSystem.NET is allowed to \"cheat\" by parsing an in-memory version of the message instead\n  of being forced to parse from disk in each iteration.\n* OpenPOP.NET fails to parse this message with the following exception:\n\n```\nSystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\u003e System.ArgumentException: Media Type must be in the format type \"/\" subtype\nParameter name: mediaType\n   at OpenPop.Mime.Header.HeaderFieldParser.cleanMediaType(String mediaType)\n   at OpenPop.Mime.Header.HeaderFieldParser.ParseContentType(String headerValue)\n   at OpenPop.Mime.Header.MessageHeader.ParseHeader(String headerName, String headerValue)\n   at OpenPop.Mime.Header.MessageHeader.ParseHeaders(NameValueCollection headers)\n   at OpenPop.Mime.Header.HeaderExtractor.ExtractHeadersAndBody(Byte[] fullRawMessage, MessageHeader\u0026 headers, Byte[]\u0026 body, IParsingErrorHandler parsingErrorHandler)\n   at OpenPop.Mime.MessagePart.ParseMultiPartBody(Byte[] rawBody)\n   at OpenPop.Mime.MessagePart.ParseMultiPartBody(Byte[] rawBody)\n   at OpenPop.Mime.Message.Load(Stream messageStream, IParsingErrorHandler parsingErrorHandler)\n   at Benchmarks.StarTrekEmailBenchmarks.OpenPOP()\n   at BenchmarkDotNet.Autogenerated.Runnable_14.WorkloadActionNoUnroll(Int64 invokeCount)\n   at BenchmarkDotNet.Engines.Engine.RunIteration(IterationData data)\n   at BenchmarkDotNet.Engines.EngineFactory.Jit(Engine engine, Int32 jitIndex, Int32 invokeCount, Int32 unrollFactor)\n   at BenchmarkDotNet.Engines.EngineFactory.CreateReadyToRun(EngineParameters engineParameters)\n   at BenchmarkDotNet.Autogenerated.Runnable_14.Run(IHost host, String benchmarkName)\n   --- End of inner exception stack trace ---\n   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\n   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\n   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n   at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args)\n```\n\n### Xamarin3EmailBenchmark\n\nIn this benchmark, each library is used to parse `xamarin3.eml` from disk 1,000 times.\n\n\n|            Method |     Mean |    Error |   StdDev |\n|------------------ |---------:|---------:|---------:|\n|           MimeKit |  1.629 s | 0.0168 s | 0.0157 s |\n| MimeKitPersistent |  1.344 s | 0.0086 s | 0.0080 s |\n|          LimiLabs | 12.503 s | 0.0421 s | 0.0394 s |\n|          Mime4Net | 85.075 s | 0.4774 s | 0.3987 s |\n|           OpenPOP | 80.162 s | 0.6835 s | 0.6059 s |\n|         AENetMail | 30.925 s | 0.2161 s | 0.1915 s |\n|     MailSystemNET | 48.179 s | 0.6107 s | 0.5713 s |\n\nNotes:\n* MailSystem.NET's parser only supports parsing from byte[] or MemoryStream, so in this test,\n  MailSystem.NET is allowed to \"cheat\" by parsing an in-memory version of the message instead\n  of being forced to parse from disk in each iteration.\n\n### Conclusions\n\nYea. No contest. MimeKit mops the floor with all of the other parsers out there.\n\nHow does **your** MIME parser compare?\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstedfast%2Fmimeparserbenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstedfast%2Fmimeparserbenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstedfast%2Fmimeparserbenchmark/lists"}