Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions MiniExcel.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<File Path=".editorconfig" />
<File Path=".gitattributes" />
<File Path=".gitignore" />
<File Path=".github\workflows\dotnet.yml" />
<File Path=".runsettings" />
<File Path="LICENSE" />
<File Path="README.md" />
Expand All @@ -17,11 +16,21 @@
<File Path="V2-Upgrade-Notes.md" />
<File Path="CODE_OF_CONDUCT.md" />
<File Path="CONTRIBUTING.md" />
<File Path=".github\workflows\benchmark.yml" />
<File Path=".github\workflows\codeql-analysis.yml" />
<File Path="miniexcel.publickey" />
<File Path="src\icon.png" />
</Folder>
<Folder Name="/Docs and settings/github/" />
<Folder Name="/Docs and settings/github/templates/">
<File Path=".github/ISSUE_TEMPLATE/bug_report.md" />
<File Path=".github/ISSUE_TEMPLATE/feature_request.md" />
</Folder>
<Folder Name="/Docs and settings/github/workflows/">
<File Path=".github/workflows/cli-release.yml" />
<File Path=".github/workflows/release-v1.yml" />
<File Path=".github\workflows\benchmark.yml" />
<File Path=".github\workflows\codeql-analysis.yml" />
<File Path=".github\workflows\dotnet.yml" />
</Folder>

<Folder Name="/Releases/">
<File Path="docs\README.md" />
Expand All @@ -37,7 +46,6 @@
<Project Path="src\MiniExcel.Csv\MiniExcel.Csv.csproj" />
<Project Path="src\MiniExcel.OpenXml/MiniExcel.OpenXml.csproj" />
<Project Path="src/MiniExcel.OpenXml.FluentMapping/MiniExcel.OpenXml.FluentMapping.csproj" />
<Project Path="src/MiniExcel.Rust/MiniExcel.Rust.csproj" />
<Project Path="src\MiniExcel\MiniExcel.csproj" />
</Folder>

Expand Down
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ At present, most popular frameworks need to load all the data from an Excel docu

### MiniExcel for Rust

MiniExcel is also available for Rust, offering lower-level control and efficient XLSX processing. See [MiniExcel-Rust](https://github.com/mini-software/MiniExcel-Rust) and the [Rust vs. .NET query benchmark](#rust-vs-net-query-benchmark).
MiniExcel is also available for Rust, offering lower-level control and efficient XLSX processing. See [MiniExcel-Rust](https://github.com/mini-software/MiniExcel-Rust).

```mermaid
flowchart LR
Expand Down Expand Up @@ -135,25 +135,6 @@ dotnet run --project .\benchmarks\MiniExcel.Benchmarks -c Release -f net9.0 -- -

You can find the benchmarks' results for the latest release [here](benchmarks/results).

#### Rust vs. .NET query benchmark

This benchmark compares dynamic, streaming query performance. The .NET implementation uses `OpenXmlImporter.Query`, while the Rust implementation uses `MiniExcel::query`. Write performance is not included. With `MiniExcel` and `MiniExcel-Rust` checked out as sibling directories, run both implementations against the same 100,000-row XLSX workbook:

```powershell
pwsh ./benchmarks/compare-rust-dotnet.ps1
```

By default, each measured iteration streams the entire workbook three times, and each runtime is measured for three iterations. The script verifies that both implementations return the same row count and reports elapsed time and peak working set. Results vary by hardware, operating system, filesystem cache, and runtime version; use `-Passes` and `-Iterations` to adjust the workload.

The following results were collected on an AMD Ryzen 5 5600X system running Windows 10 22H2, .NET SDK 10.0.103, and Rust 1.85.0:

| Runtime | Method | Rows per iteration | Average elapsed | Average peak working set | Maximum peak working set |
|---------|--------|-------------------:|----------------:|-------------------------:|-------------------------:|
| .NET | `OpenXmlImporter.Query` | 300,000 | 6,282.31 ms | 70.65 MB | 70.71 MB |
| Rust | `MiniExcel::query` | 300,000 | 3,814.61 ms | 9.79 MB | 9.83 MB |

These measurements are from a single machine and do not constitute a general performance guarantee.


### Excel Query/Import <a name="getstart1"></a>

Expand Down
20 changes: 1 addition & 19 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MiniExcel简单、高效避免OOM的.NET处理Excel查、写、填充数据工

### MiniExcel Rust

MiniExcel 现已支持 Rust,提供更底层的控制和高效的 XLSX 处理。详见 [MiniExcel-Rust](https://github.com/mini-software/MiniExcel-Rust/blob/main/README.zh-CN.md) 与 [Rust/.NET 基准测试](#rust-与-net-基准测试)
MiniExcel 现已支持 Rust,提供更底层的控制和高效的 XLSX 处理。详见 [MiniExcel-Rust](https://github.com/mini-software/MiniExcel-Rust/blob/main/README.zh-CN.md)。

目前主流框架大多需要将数据全载入到内存方便操作,但这会导致内存消耗问题,MiniExcel 尝试以 Stream 角度写底层算法逻辑,能让原本1000多MB占用降低到几MB,避免内存不够情况。

Expand Down Expand Up @@ -123,24 +123,6 @@ IterationCount=3 LaunchCount=3 WarmupCount=3

Benchmark History : [Link](https://github.com/mini-software/MiniExcel/issues/276)

#### Rust 与 .NET 基准测试

此基准测试比较动态流式 Query 性能:.NET 使用 `OpenXmlImporter.Query`,Rust 使用 `MiniExcel::query`,不包含 Save 性能。将 `MiniExcel` 与 `MiniExcel-Rust` 放在同级目录后,可使用同一份 100,000 行 XLSX 工作簿测试两种实现:

```powershell
pwsh ./benchmarks/compare-rust-dotnet.ps1
```

默认每轮完整流式读取 3 次,并对每个运行时重复测试 3 轮。脚本会校验两端读取行数一致,并输出耗时与峰值工作集。结果会受硬件、操作系统、文件缓存及运行时版本影响,可通过 `-Passes` 和 `-Iterations` 调整测试负载。

测试环境:AMD Ryzen 5 5600X、Windows 10 22H2、.NET SDK 10.0.103、Rust 1.85.0。

| 运行时 | 方法 | 每轮读取行数 | 平均耗时 | 平均峰值工作集 | 最大峰值工作集 |
|--------|------|-------------:|---------:|---------------:|---------------:|
| .NET | `OpenXmlImporter.Query` | 300,000 | 6,282.31 ms | 70.65 MB | 70.71 MB |
| Rust | `MiniExcel::query` | 300,000 | 3,814.61 ms | 9.79 MB | 9.83 MB |

以上结果仅供同机环境参考,不代表所有环境下的性能表现。


#### 导入、查询 Excel 比较
Expand Down

This file was deleted.

168 changes: 0 additions & 168 deletions benchmarks/MiniExcel.Rust.PackageTests/Program.cs

This file was deleted.

14 changes: 0 additions & 14 deletions benchmarks/MiniExcel.StressTests/MiniExcel.StressTests.csproj

This file was deleted.

28 changes: 0 additions & 28 deletions benchmarks/MiniExcel.StressTests/Program.cs

This file was deleted.

Loading
Loading