[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/el-job 6d6445cc16 033/143: Try fix org-node#78
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/el-job 6d6445cc16 033/143: Try fix org-node#78 |
Date: |
Fri, 21 Mar 2025 19:00:24 -0400 (EDT) |
branch: elpa/el-job
commit 6d6445cc16d4fb030a6750bdbbfb2483d5aafcbf
Author: Martin Edström <meedstrom91@gmail.com>
Commit: Martin Edström <meedstrom91@gmail.com>
Try fix org-node#78
---
el-job.el | 42 +++++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/el-job.el b/el-job.el
index 249e03ef25..2a4d189759 100644
--- a/el-job.el
+++ b/el-job.el
@@ -186,13 +186,14 @@ being saddled with a mega-item in addition to the average
workload."
(if (length= sublists n)
(progn (push item items)
(throw 'filled t))
- (setq dur (float-time (or (gethash item table) 0)))
+ (setq dur (gethash item table))
(if (null dur)
(push item untimed)
+ (setq dur (float-time dur))
(if (> dur max-per-core)
;; Dedicate huge items to their own cores
(push (list item) sublists)
- ;; Grow a sublist unless it would hit the max
+ ;; Grow a sublist unless it would exceed the max
(if (< dur (- max-per-core this-sublist-sum))
(progn
(push item this-sublist)
@@ -203,27 +204,22 @@ being saddled with a mega-item in addition to the average
workload."
(setq this-sublist-sum 0)
(setq this-sublist nil)
(push item items)))))))
- (if this-sublist
- ;; Last sublist did not max out, let it absorb all remaining
- ;; items. (Sloppy, as there could be a lot in special cases, but
- ;; benchmarks should make it moot for next time.)
- (push (nconc untimed items this-sublist) sublists)
- ;; Last sublist already hit max, spread leftovers equally
- (let ((ctr 0)
- (len (length sublists)))
- (if (= len 0)
- (error "el-job: Unexpected code path, report appreciated!
Data: %S"
- (list 'n n
- 'total-duration total-duration
- 'max-per-core max-per-core
- 'this-sublist-sum this-sublist-sum
- 'untimed untimed
- 'items items
- 'sublists sublists
- 'this-sublist this-sublist))
- (dolist (item (nconc untimed items))
- (push item (nth (% (cl-incf ctr) len)
- sublists))))))
+ ;; Spread leftovers equally
+ (let ((ctr 0)
+ (len (length sublists)))
+ (if (= len 0)
+ (error "el-job: Unexpected code path, report appreciated!
Data: %S"
+ (list 'n n
+ 'total-duration total-duration
+ 'max-per-core max-per-core
+ 'this-sublist-sum this-sublist-sum
+ 'untimed untimed
+ 'items items
+ 'sublists sublists
+ 'this-sublist this-sublist))
+ (dolist (item (nconc this-sublist untimed items))
+ (push item (nth (% (cl-incf ctr) len)
+ sublists)))))
sublists)))))
(defun el-job--split-evenly (big-list n)
- [nongnu] elpa/el-job b01324750d 004/143: ., (continued)
- [nongnu] elpa/el-job b01324750d 004/143: ., ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 207351fe2d 015/143: Many refactor wow, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 7ccd8ece82 011/143: docs, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 940e8ff2e1 026/143: Fix: don't use old inputs sometimes, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 462582b597 027/143: Try fix "Items split in X lists, but only Y ready processes", ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job c0598fb26b 023/143: Another possible fix for org-node #70, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 32ea3c1839 020/143: Docs, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 3b3b800153 019/143: Add an autoload for easier load-path checks, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 307d81fd1d 025/143: Simplify a bit, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 43e7702fac 022/143: Try to fix org-node issue #70, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 6d6445cc16 033/143: Try fix org-node#78,
ELPA Syncer <=
- [nongnu] elpa/el-job 10ba5197e3 032/143: Add an error-catch, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job e90fd07c3c 031/143: Add a test, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 5c28a27d99 034/143: Some new function names, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 6c5879c74b 036/143: Hotfix, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job aa852eaf10 039/143: Polish, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 881d0ec3a2 041/143: Polish, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job b93884c3cd 076/143: Add a Package-Version, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 7184447ab3 083/143: Release version 1.0.5, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 310da7e3ba 077/143: Fix deprecated arg handling, ELPA Syncer, 2025/03/21
- [nongnu] elpa/el-job 252c669cd5 042/143: Move code around, ELPA Syncer, 2025/03/21