Coder Social home page Coder Social logo

excelizeam's Introduction

excelizeam

Wrapper to facilitate use of excelize.StreamWriter in qax-os/excelize

Motivation

excelize.StreamWriter in qax-os/excelize has been found to be able to write large amounts of data at high speed while reducing memory usage, and should be used aggressively, but its use is severely limited, and Excel itself will be damaged if the order of writes is incorrect.

Therefore, a Wrapper was created to automatically meet the restrictions.

When using SyncMethod such as SetCellValue(), there is no advantage in speed, but by using Async function such as SetCellValueAsync(), it is possible to achieve almost the same speed as excelize.StreamWriter.

qax-os/excelizeexcelize.StreamWriter は大量のデータをメモリ使用量を抑えつつ高速に書き込むことが出来る事が示されており積極的に利用したいが、利用する際の制限が厳しく書き込みの順番を間違えるとExcel自体が破損してしまうため、そのままでは使い所が難しい。

そのため制限を自動的に満たすためのWrapperを作成した。

SetCellValue() のようなSyncMethodを使用する場合は速度面でのメリットを享受出来ないが、 SetCellValueAsync() のようなAsync関数を利用することで excelize.StreamWriter とほぼ同様の速度を出すことが可能になる。

BenchmarkExcelizeam
BenchmarkExcelizeam/Excelize
BenchmarkExcelizeam/Excelize-12                  	       9	 124964492 ns/op
BenchmarkExcelizeam/Excelize_Async
BenchmarkExcelizeam/Excelize_Async-12   	               6	 208647106 ns/op
BenchmarkExcelizeam/Excelize_StreamWriter
BenchmarkExcelizeam/Excelize_StreamWriter-12         	      12	  89386412 ns/op
BenchmarkExcelizeam/Excelizeam_Sync
BenchmarkExcelizeam/Excelizeam_Sync-12               	       5	 232665514 ns/op
BenchmarkExcelizeam/Excelizeam_Async
BenchmarkExcelizeam/Excelizeam_Async-12              	      13	  86562598 ns/op

Usage

install your project

go get github.com/tomtwinkle/[email protected]

TODO

excelizeam's People

Contributors

tomtwinkle avatar dependabot[bot] avatar

Stargazers

cyclone_vox avatar Yudai Takada avatar

Watchers

 avatar

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.