SnakeViz is one tool for visualizing the output of cProfile. You can call cProfile in IPython with the %prun magic command.
https://jiffyclub.github.io/snakeviz/ https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-prun https://github.com/vinta/awesome-python#debugging-tools lists a few line profiling tools. Note that the %timeit magic command runs things very many times in order to isolate out transient sources of variance in timing. In addition to the other processes that could be running on a system under test, Sysdig can monitor application performance with Tracers: https://sysdig.com/blog/tracking-down-application-bottlenecks-with-tracers/ https://docs.python.org/3/library/debug.html https://docs.python.org/3/library/profile.html https://pymotw.com/2/profile/ "profile, cProfile, and pstats – Performance analysis of Python programs." On Sat, Oct 31, 2020, 2:32 AM Nicholas Car < nicholas....@surroundaustralia.com> wrote: > Hi all, > > The slowness of executing a SPARQL query against an RDFlib Graph annoys me > so I often use loops over them instead, but this leads to, sometimes, > verbose Python programming that's not translatable to triplestores with > SPARQL interfaces and other programming languages etc. > > I would love to see RDFlibs' graph.query function sped up so I could just > use SPARQL queries! > > Is anyone else on this list interested in this and do you have experience > profiling Python to find out where the slowness occurs? If we knew where > the slowness occurs, we might be able to find a way to speed things up. > > Thanks, > > Nick > > -- > > > ______________________________________________________________________________________ > kind regards > *Dr Nicholas Car* > Data Systems Architect at SURROUND Australia Pty Ltd > Address P.O. Box 86, Mawson, Canberra ACT 2607 > Phone +61 477 560 177 <++61+477+560+177> > Email nicholas.car@surroundaustralia.comWebsite > https://www.surroundaustralia.com > > *Enhancing Intelligence Within Organisations* > *delivering evidence that connects decisions to outcomes* > > > [image: Australian-National-University-Logo-1 – ANU Centre for Water and > Landscape Dynamics] > > *Dr Nicholas Car* > Adj. Senior Lecturer > > Research School of Computer Science > > The Australian National University > Canberra ACT Australia > > > > https://orcid.org/0000-0002-8742-7730 > > https://cs.anu.edu.au/people/nicholas-car > > -- > http://github.com/RDFLib > --- > You received this message because you are subscribed to the Google Groups > "rdflib-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rdflib-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rdflib-dev/CAP7nqh0RcyZXDScSpB8a2LgkYiRd2YHCbLrodoqbtHL2XiCyYg%40mail.gmail.com > <https://groups.google.com/d/msgid/rdflib-dev/CAP7nqh0RcyZXDScSpB8a2LgkYiRd2YHCbLrodoqbtHL2XiCyYg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CACfEFw-yV6uXXwYqASykdCXDadRqmpGO7_GiN%3DQKx7Pp8hn9Jg%40mail.gmail.com.