Run many packages in parallel to avoid overhead and make use of CPUS #16
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "parallize_packages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -95,3 +103,3 @@
if args.export:
TestExporter(args.package).run()
if len(args.packages) != 0:
You mean
> 1
?Actually I meant != 1 :)
@ -110,3 +116,1 @@
)
exporter.set_gc_interval(args.gc)
exporter.export_as_git()
with concurrent.futures.ProcessPoolExecutor() as executor:
Making
max_workers
toNone
will create one process per CPU. That is OK in my desktop, but laptop report like 32 of them, and I am sure this will kill OBS. Maybe create a parameter with some low default?I guess I can just hard code to 8. Would that work for you?
seems safer
@ -205,0 +222,4 @@
]
concurrent.futures.wait(fs)
self.db.conn.commit()
Why is this required?
It's just to avoid wasting too much time when the script exists in the followup step.
@ -205,0 +230,4 @@
]
concurrent.futures.wait(fs)
self.db.conn.commit()
Same? Is there any transaction open?
@ -205,0 +243,4 @@
for project, package in cur.fetchall()
]
concurrent.futures.wait(fs)
self.db.conn.commit()
Is not closing the cursor
with
doing the commit?No, only closing the database connection does. Everything until then stays in a transaction.