view service/piNode/rdflib_pi_opt.py @ 1490:455b1b80516e

introduce capnp, more build, some demos Ignore-this: 29801e9e9f8a85fd0d822207c6eacce1 darcs-hash:b2da18876d27b0fb9192811375752b5c4e7322e0
author drewp <drewp@bigasterisk.com>
date Thu, 23 Jan 2020 21:00:47 -0800
parents 99540f1a11f7
children
line wrap: on
line source

import rdflib.plugins.memory


def patchRandid():
    """
    I'm concerned urandom is slow on raspberry pi, and I'm adding to
    graphs a lot. Unclear what the ordered return values might do to
    the balancing of the graph.
    """
    _id_serial = [1000]
    def randid():
        _id_serial[0] += 1
        return _id_serial[0]
    rdflib.plugins.memory.randid = randid