IRONSOFTWAREHOME
DEVELOPER UPDATES

HTML String to PDF: 3x Faster and 43% Lighter, v2026.1 to v2026.9

Curtis Chau
Curtis Chau
Updated: September 7, 2026

IronPDF's latest version renders an in-memory HTML string to PDF in 390 milliseconds, down from 1.22 seconds in v2026.1, using 64 KB of peak memory instead of 112 KB. Same input, same method call, same hardware, 68% faster and 43% lighter on memory per render.

The data below is from RenderHtmlAsPdf() on the same in-memory HTML string, measured with BenchmarkDotNet on the same machine.

Where do the gains show up?

Both metrics moved. Speed came down modestly. Memory came down dramatically.

HTML String to PDF: 3x Faster and 43% Lighter: Image 1

MetricIronPDF v2026.1IronPDF v2026.9Improvement
Processing time1.22s390ms68% faster

Predictable render time is what lets you plan capacity without re-benchmarking every version.

HTML String to PDF: 3x Faster and 43% Lighter: Image 2

MetricIronPDF 2026.1IronPDF 2026.9Improvement
Peak memory112 KB64 KB43% lower

This is the number worth a second look. Peak memory per render dropped by 48 KB on every call.

  • 10,000 renders saves 480 MB of peak memory
  • 100,000 renders saves 4.8 GB
  • 1,000,000 renders saves 48 GB

Less peak memory per render means the nightly job that used to need a bigger instance now runs on the one you already have.

Better performance, same workflow

IronPDF continues to improve behind the same familiar APIs, so you can benefit from the latest performance and compatibility updates without changing how your application works.

Upgrade to the latest version to keep your PDF workflows current, with support for .NET 10 and ongoing improvements built into the product.

What has actually changed?

Faster numbers come from specific changes, not general effort and the specific changes are the interesting part.

  1. Buffer reuse in the Chromium bridge: The internal buffer that carries rendered page data between the Chromium process and .NET was being allocated on every render. It is now pooled and reused across calls.
  2. Reduced intermediate allocations in the HTML parser: The pre-render pass that inspects the HTML string for external references was allocating short-lived string objects on every element. Those allocations were removed.
  3. Stream-based PDF assembly: The final PDF was being assembled in a single in-memory buffer before being written out. It now streams directly to the output.

Each change addressed a specific allocation pattern that showed up as a peak-memory spike during profiling. Together they account for the 92 KB drop.

How is it measured?

Speed and memory are two different questions, so we measure them with two different tools rather than one number that blurs both.

Exec time is measured with BenchmarkDotNet. It repeats the call as many times as it needs to until the timing settles, then reports the stable mean. Both versions were tested on the same hardware, back to back, in the same session.

Peak memory is sampled from the process every 25 ms during a single render call. It captures the highest amount of memory the render uses at any point which is what tells you how much headroom each document needs on your server. Sampling at 25 ms means brief spikes are caught, not averaged away.

The HTML input, the calling code, and the hardware were identical across both measurements. The only thing that changed between them was the IronPDF version.

Put it on your own documents

Update the new version and your next render allocates 43% less peak memory than today's, with no code changes and no migration.

The memory improvement is the reason to upgrade this cycle. Under any concurrent load, that's real capacity back, capacity you no longer have to provision.

New to IronPDF? Try IronPDF Free for 30 Days.

Benchmark environment: Same hardware, same in-memory HTML string, same method call across IronPDF 2026.1 and 2026.9. BenchmarkDotNet means for exec time; 25 ms process-memory sampling for peak memory.

Read next: 55% Faster HTML to PDF, Lower Memory, the same benchmark methodology applied to file-based HTML input.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999