annotate service/piNode/rdflib_pi_opt.py @ 1562:c2ed44ed1e3c dependabot/pip/service/collector/twisted-19.7.0

Bump twisted from 19.2.0 to 19.7.0 in /service/collector Bumps [twisted](https://github.com/twisted/twisted) from 19.2.0 to 19.7.0. - [Release notes](https://github.com/twisted/twisted/releases) - [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst) - [Commits](https://github.com/twisted/twisted/compare/twisted-19.2.0...twisted-19.7.0) Signed-off-by: dependabot[bot] <support@github.com>
author dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
date Fri, 14 Feb 2020 10:01:26 +0000
parents 99540f1a11f7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1443
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
1 import rdflib.plugins.memory
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
2
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
3
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
4 def patchRandid():
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
5 """
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
6 I'm concerned urandom is slow on raspberry pi, and I'm adding to
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
7 graphs a lot. Unclear what the ordered return values might do to
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
8 the balancing of the graph.
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
9 """
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
10 _id_serial = [1000]
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
11 def randid():
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
12 _id_serial[0] += 1
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
13 return _id_serial[0]
99540f1a11f7 move bnode id optimization to its own file. more logging cleanups
drewp <drewp@bigasterisk.com>
parents:
diff changeset
14 rdflib.plugins.memory.randid = randid