comparison service/piNode/rdflib_pi_opt.py @ 1443:99540f1a11f7

move bnode id optimization to its own file. more logging cleanups Ignore-this: 1787f7268eafa52e7c094e327333021c darcs-hash:3cf4550608b04f4ff91a76a3a00b129f0d9bcccb
author drewp <drewp@bigasterisk.com>
date Mon, 12 Aug 2019 16:46:52 -0700
parents
children
comparison
equal deleted inserted replaced
1442:759841548982 1443:99540f1a11f7
1 import rdflib.plugins.memory
2
3
4 def patchRandid():
5 """
6 I'm concerned urandom is slow on raspberry pi, and I'm adding to
7 graphs a lot. Unclear what the ordered return values might do to
8 the balancing of the graph.
9 """
10 _id_serial = [1000]
11 def randid():
12 _id_serial[0] += 1
13 return _id_serial[0]
14 rdflib.plugins.memory.randid = randid