iliekcomputers how fast did the stats calculation takes place
iliekcomputers
request triggered at 06:28, all messages sent back at 06:36
the query took 390s.
ishaanshah[m]
Nice, thats really fast
Without any optimisation
iliekcomputers
i was talking to a friend who's been working with spark.
he said that a major source for optimization we might wanna look at is how we partition the dataframes between workers when they are loaded into memory
right now, it is possible that we have a lot of executors sitting idle because the data isn't partitioned minutely enough.
alastairp
ruaok: perfect, that' looks great
iliekcomputers
anyways, i think we'll cross that bridge when we get to it, but something to investigate.
ishaanshah[m]
Hmm, but right now I think the bottleneck is time taken for full export
iliekcomputers
yeah.
that's a pita.
there's some real low hanging fruit there
ishaanshah[m]
We should optimize that or look into streaming listens as they come
But thats after gsoc ig😅
iliekcomputers
yeah. i would say let's build on the infrastructure we have right now, and then see what to do.
i've changed the cron jobs so that a new dump gets imported every week
so the weekly report thing should still work.
ishaanshah[m]
Yeah
iliekcomputers
did you see my comment about the API breaking if we change the code that gets the count before the new stats get written into the db?
ishaanshah[m]
Yeah I did
If it takes only six minutes to gen stats again
I think it would be ok if API is broken for six mins?
iliekcomputers
i guess, it's a question of tradeoff.
we've said that the endpoint is in beta, so it probably will be ok.
however, the profile page breaking for 6 min, i wouldn't want to take that downtime if we can avoid it
ishaanshah[m]
Or maybe I will just do try/except
And then do a further PR to remove it agin
iliekcomputers
so you'd have to write the try-except or if-else anyways.
i'd just put it in there for both of them and remove it later
yeah.
ishaanshah[m]
Yep, I will do that
iliekcomputers
also, i was thinking about something else
we've made schema changes to the json in the artist column. will the old data get overwritten when new data comes in? It won't linger around because the new data gets written to all_time while the old data was written to something_else.all_time?
ishaanshah[m]
I think it should get overwritten
But it would be better to drop the table and then recalculate
Once the new schema is in
It will definitely get overwritten
iliekcomputers
hmm, maybe truncating the table is a good idea.
but if it gets overwritten, that's cool
ishaanshah[m]
I believe the count was outside all_time before
So that will remain lingering
But other than that it should be fine
iliekcomputers
:/
yea, we probably should truncate it then
ishaanshah[m]
Can we truncate before deployment
iliekcomputers
why?
ishaanshah[m]
If we are gonna truncate anyways
It doesn't make sense to have try/except
iliekcomputers
true.
if the table doesn't have data, it'll give us a 204.
yeah, that sounds reasonable.
ishaanshah[m]
Yeah
iliekcomputers
and the profile page won't break.
ishaanshah[m]
I will have a look at the profile page to make sure it doesn't break
shivam-kapila: cool, thanks. I normally drink plain black tea with only water, but I will try an all-milk chai masala today
iliekcomputers: one thing that we're missing in AB/LB is a local tool for checking flake8 errors (and an easy way to run it)
I'm not sure I want to go as far as a pre-commit hook, but we should have something as easy as tests for people to get feedback (maybe we even run it as part of tests?)
so that we can minimise these "fix pep8 errors" commits ;)
iliekcomputers
We have a lint.sh that runs prettier fixes. Something similar for Python would be nice, I agree
one thing I don't like about pep8speaks is that it reads config from its own file :( would be nice to not have to duplicate this
otherwise, I was thinking of doing a single PR in AB soon which just cleans up all issues
then it'll be guaranteed that any message in a PR will be because of whoever wrote that PR
ZaphodBeeblebrox
[20:42] <alastairp> I have a masala chai
[20:41] <alastairp> I need help from someone who drinks chai
alastairp: what I do is I boil water and milk and use about half'n'half
(granted I've also made it with assam-tea and all the spices from scratch :D)
alastairp
thanks ZaphodBeeblebrox! It looks like it's "permitted" to try a bunch of variations and see what I like, then
shivam-kapila
The milk-water combo is all your prefs
iliekcomputers
I'm not really trying to enforce pep8 across the repository. A lot of the whitespace guidelines, for example, are nice to haves, but optional imo. a big PR doesn't really make sense in that context. The benefit of pep8 speaks for us is that it catches bugs sometimes too.
alastairp
if that's the case, it might be nice to see if we can disable those warnings, then? I dunno... it seems like we should either go all-in, or get rid of what's not useful for us
otherwise we grow complacent
"oh, that's just one of the warnings that we're allowed to ignore"
ZaphodBeeblebrox
ruaok> most played artists on listenbrainz and their most played tracks:
IRON MAIDEN! \m/ run to the hills \m/
iliekcomputers
Yeah, true.
alastairp
I've not used autopep8 before, I'll look into it. I use pycharm to format all of my stuff anyway, so _most_ of the time I don't run into problems
iliekcomputers
But making a disable list is work :D
alastairp
well, pep8speaks gives a list of codes
choose the ones you don't want, and add it...
ZaphodBeeblebrox
alastairp: well I'm some norwegian cat doing it - granted I read on wikipedia about how it's "properly" done, but still :D
maybe I should try doing it all milk next time I make one 🤔
iliekcomputers
alastairp: I was joking, I'll start adding rules we ignore to our config next PR onwards.
alastairp
ZaphodBeeblebrox: right. When I was with friends in India it was all milk, so I guess that's what they did in that specific area
iliekcomputers: great. do you mind coordinating about it? just to make sure we're consistent, and agree on what to ignore?
ZaphodBeeblebrox
when I did the boil/soak assam-with-spices method I used only milk i think
alastairp
which one do you not like? Indent continuation?
ZaphodBeeblebrox
bwahahaha 289181 Johann Sebastian Bach
iliekcomputers
The 2 lines after functions, but 1 line after methods
ZaphodBeeblebrox
I think ours is the only time any classical - music things have been on such a list
iliekcomputers
I don't have any others rn
alastairp
oh, I love that one
:(
ZaphodBeeblebrox
<3 us
alastairp
I mean, I guess I just got used to it after pycharm complained so much