Skip to content

Commit 329de54

Browse files
committed
Merge branch 'develop' for v1.2.1
2 parents eaf6a6d + 5803f08 commit 329de54

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [1.2.1] - 2020-04-01
4+
### Added
5+
- Can bind a dynamic `*n-threads*` var to set the number of threads used during
6+
writing.
7+
8+
## [1.2.0] - 2020-08-13
9+
### Added
10+
- Performance improvements for large worksheets.
11+
312
## [1.1.2] - 2019-06-04
413
### Fixed
514
- If the first level of the tree is a leaf, `accounting-table` doesn't walk it

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ common sense styling.
88

99
Lein:
1010
```
11-
[org.clojars.mjdowney/excel-clj "1.2.0"]
11+
[org.clojars.mjdowney/excel-clj "1.2.1"]
1212
```
1313

1414
- [Getting Started](#getting-started)

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject org.clojars.mjdowney/excel-clj "1.2.0"
1+
(defproject org.clojars.mjdowney/excel-clj "1.2.1"
22
:description "Generate Excel documents & PDFs from Clojure data."
33
:url "https://github.com/matthewdowney/excel-clj"
44
:license {:name "Eclipse Public License"

src/excel_clj/core.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@
8989
the column width."
9090
15000)
9191

92+
(def ^:dynamic *n-threads*
93+
"Allow a custom number of threads used during writing."
94+
(+ 2 (.. Runtime getRuntime availableProcessors)))
95+
9296
(defmacro ^:private doparallel [[sym coll] & body]
9397
"Performance hack for writing the POI cells.
9498
Like (dotimes [x xs] ...) but parallel."
95-
`(let [n# (+ 2 (.. Runtime getRuntime availableProcessors))
99+
`(let [n# *n-threads*
96100
equal-chunks# (loop [num# n#, parts# [], coll# ~coll, c# (count ~coll)]
97101
(if (<= num# 0)
98102
parts#

0 commit comments

Comments
 (0)