IRC logs for #buildstream for Sunday, 2020-06-28

*** benschubert has quit IRC00:06
*** hasebastian has joined #buildstream01:32
*** tristan has joined #buildstream04:44
*** ChanServ sets mode: +o tristan04:44
*** tristan has quit IRC05:51
*** hasebastian has quit IRC06:11
*** tristan has joined #buildstream11:46
*** ChanServ sets mode: +o tristan11:46
*** tristan has quit IRC14:01
*** tristan has joined #buildstream14:49
*** ChanServ sets mode: +o tristan14:49
*** benschubert has joined #buildstream15:09
benschuberttristan: nice change for the variables, I'll go through it probably tomorrow15:12
benschubertHave you managed to get any benchmarking done for it?15:12
tristanbenschubert, commented on !1973 :)15:18
tristanDoesnt seem to dramatically affect performance15:18
tristanI think that changing `while queue: ... queue.pop()` for deque() type might improve performance too, but doing this with cdef (and `from libcpp.deque import deque`) appears pretty tricky15:19
tristans/from .. import deque/from .. cimport deque/15:20
benschubertmmh fair15:20
benschuberthave you tried a big project with few variables also by any chance? Otherwise I can try that15:20
tristanThe performance is either better or worse than master15:20
tristandepending on --format %{vars} (as commented)... no I didn't try further benchmarking15:21
tristanThe error reporting is much improved for cyclic and undefined variables too15:21
tristantox -e py37 -- -s tests/format/variables.py::test_circular_reference for a sample15:22
benschubertok :) I'll have a look, thanks a lot15:23
tristanbenschubert, or here is a sample: https://bpa.st/TZUA :)15:23
benschubertoh nice! And what happens for a -> b -> c -> a ?15:23
tristanThat is such a case15:24
tristanSorry, didn't collect every link in the chain15:24
benschubertah ok, so we don't get the whole chain?15:24
tristanThe detail mentions a direct reference, while the main message is where the error occurs and we know that (somewhere) there is a reference to the variable in the detail15:24
tristanGetting the whole chain might be plausible15:25
benschubertyeah It usually helps to get the head around15:25
benschubertLike a 10-ish variables cycle would be quite hard to understand otherwise15:25
tristanI'm not sure if it's more expensive, probably can do it by enhancing https://gitlab.com/BuildStream/buildstream/-/blob/tristan/partial-variables/src/buildstream/_variables.pyx#L30115:26
tristanSuch that we store more information in the dict15:26
tristanCurrently I use a dict of sets, where each entry is a variable name, and a set of direct references from that variable15:26
tristane.g. "foo: "%{bar}, %{baz}" is { 'foo': { 'bar', 'baz' } }15:27
benschuberttristan: if that means having to do a second pass on a cycle, it's fine too? We might have like a "error handling" one that is slower but keeps all the info15:27
benschubertand do the minimal in the happy case15:27
tristanPossible also15:27
tristanMore wordy15:27
tristanI mean, currently it certainly better than: https://gitlab.com/BuildStream/buildstream/-/blob/master/src/buildstream/_variables.pyx#L20915:28
tristanbut I'll look into a full chain too since my head is close by (not tonight, perhaps tomorrow)15:29
benschubertthanks :)15:31
tristanit was an interesting brain exercise to convert recursive stuff to queues :)15:31
* tristan off for midnight snack...15:32
*** jward has joined #buildstream22:08
*** benschubert has quit IRC23:29

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!