GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — shelve: `Shelf.clear()` has very poor performance · Issue #107089 · python/cpython Closed Labels performancePerformance or resource usagePerformance or resource usage DescriptionBug reportCalling the It can be seen in this script, which creates a database with 10,000 entries and immediately clears it. import os import shelve import tempfile with tempfile.TemporaryDirectory() as tempdir: filename = os.path.join(tempdir, "test-shelf") with shelve.open(filename) as db: items = {str(x):x for x in range(10000)} db.update(items) db.clear() print("ok") On my M2 Mac Mini, this script takes about 2.1 seconds. On a Debian VPS: Your environment
Linked PRsActivity
MetadataMetadataAssigneesLabelsperformancePerformance or resource usagePerformance or resource usage Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |