These are chat archives for arenanet/api-cdi

26th
Feb 2016
idivait
@idivait
Feb 26 2016 00:47
The hair animation on that is lovely. Really need to play around with web animation in my free time.
Eearslya Sleiarion
@Eearslya
Feb 26 2016 01:00
@lye GM-Only item? Do go on.
It was a halloween event thing
nothing exciting
smiley
@codemasher
Feb 26 2016 01:09
ok, this is perhaps as fast as you can get with a mysql multi insert in php https://github.com/codemasher/gw2-database/blob/master/src/Database/Drivers/GW2MySQLiDriver.php#L56
:computer: -> :fire: :fire: :fire:
IIRC you get faster with a bulk insert (though if you're doing all the inserts within a single transaction the benefits aren't that large)
But if your bottleneck isn't the API then I guess I'm not doing that bad of a job :D
smiley
@codemasher
Feb 26 2016 10:26
@lye i'm unsure if a bulk insert would be faster since the insert values have to prepared, which was the bottleneck so far, because i built the array before the query. But even with just 200 items per insert, this costs way more time than having the prepared statement open and pull/prepare each line via callback.
smiley
@codemasher
Feb 26 2016 11:33
[ 501.6193s] chillerlan\GW2DB\Updaters\Items\TempUpdater::init: end - well, max bandwidth at work is ~360kb/s...
download size is approx 170Mb, right?
smiley
@codemasher
Feb 26 2016 11:41
throttling is brilliant, receive the exact amount of data per second as your line allows:
[2016-02-26T11:40:04+00:00][   68.0203s] [zh] 2cf6b67688124cb7705cea8603c75768 updated
[2016-02-26T11:40:04+00:00][   68.1097s] [fr] e888fe6fbd7bbc5fc095727bbd875421 updated
[2016-02-26T11:40:04+00:00][   68.1842s] [en] 3f3741f0a4e166a287dd15133b6aa7a7 updated
[2016-02-26T11:40:04+00:00][   68.2596s] [es] bd5bca1919e4a063086842758f8f1ff6 updated
[2016-02-26T11:40:05+00:00][   68.7209s] [fr] 9a1da490257ac33f1efb9af228628fbf updated
[2016-02-26T11:40:05+00:00][   68.7901s] [en] a15d946e4b3fb90835a69fe60ac852c0 updated
[2016-02-26T11:40:05+00:00][   68.8586s] [de] 3882a389a5bfd015b78028d1e13d8180 updated
[2016-02-26T11:40:05+00:00][   68.9537s] [es] 76daab7c8c42c22216c3c28e6bd5aa9c updated
smiley
@codemasher
Feb 26 2016 20:26
friday afternoon commit message codemasher/gw2-database@b59e37e
it's not so much "it's allowed" as "it's tradition"
smiley
@codemasher
Feb 26 2016 20:26
heh
man this is such a lame friday, I did all the scary deploys earlier this week
smiley
@codemasher
Feb 26 2016 20:27
(i'm gonna save that for next week XD)
haha
i have yet to squash another nasty bug which popped up a couple hours ago...
that's pretty much the story of my life
smiley
@codemasher
Feb 26 2016 20:28
haha
i don't usually do this, but i had a pretty busy day at work, so i couldn't look into it >.<
and i need to get that repo to my other machine somehow... yay for broken builds!
windwarrior
@windwarrior
Feb 26 2016 20:30
I should always type "git checkout -b something" before pushing broken code ;)
smiley
@codemasher
Feb 26 2016 20:31
i'm way too lazy
and phpstorm is way too comfortable
windwarrior
@windwarrior
Feb 26 2016 20:31
LOOOL
gitter understands s/bla/bla/
smiley
@codemasher
Feb 26 2016 20:32
yup
slack doesn't though, it's my bane
Pat Cavit
@tivac
Feb 26 2016 20:32
really? flowdock supports it too
smiley
@codemasher
Feb 26 2016 20:33
i can't remember where i read it but gitter told me at some point that it works
windwarrior
@windwarrior
Feb 26 2016 20:34
I find it very convenient that you can actually change your messages on Gitter
wish that would work for texts and such as well :')
smiley
@codemasher
Feb 26 2016 20:34
and twitter öö
no really, i'm one of those people who edit a lot of their posts :D
windwarrior
@windwarrior
Feb 26 2016 20:35
yep same
unrelated: http://jsfiddle.net/fffam/jL16f3hz/?utm_source=website&utm_medium=embed&utm_campaign=jL16f3hz makes me wish we had endpoints for the fractal metadata
windwarrior
@windwarrior
Feb 26 2016 20:36
yeah, this exactly is why I asked for it a few weeks ago
I think I remember looking into it and it being a massive disaster to export
Ah yeah, here's the issue for it: arenanet/api-cdi#173
lye @lye sighs
smiley
@codemasher
Feb 26 2016 20:58
hmm, looking at my CPU burning one of it's 8 cores makes http://php.net/manual/book.pthreads.php tempting. If only i knew more about it >.<
anyone here?
I've only used pthreads in C
threads aren't terribly hard as long as you model the dataflow sanely
smiley
@codemasher
Feb 26 2016 20:59
i guess you need some deeper knowledge about system internals, eh?
not really
smiley
@codemasher
Feb 26 2016 21:00
ok
for example, you could have N threads fetching data and pushing data to a shared queue where it gets popped off by another thread whose job is to push it into the database
typically producer-consumer setup with multiple producers
the important bit to note is that the only shared state between threads is the queue, which should be threadsafe (either using a mutex or a lock-free datastructure)
smiley
@codemasher
Feb 26 2016 21:01
although i appreciate your explanation, this is already beyond me - i might need some time to wrap my head around that :D
(i've never studied or got taught in that stuff)
(my way of learning is: take an example, tear it apart to it's bones, distill the essence and then build something new from it)
windwarrior
@windwarrior
Feb 26 2016 21:08
You should read about it, threading is quite interesting and often is something that is poorly understood :).
smiley
@codemasher
Feb 26 2016 21:10
thats's why it is tempting for me, i always choose to create things, others shy away from because too hard :D
but i really want to use this thing as i can see the positive performance impact it would have
windwarrior
@windwarrior
Feb 26 2016 21:12
Be ready for unexplainable probable concurrency bugs then
smiley
@codemasher
Feb 26 2016 21:12
haha, no worries, i'm used to run into php bugs
like any known to man
eh as long as you still to a CSP model concurrency is pretty easy (https://en.wikipedia.org/wiki/Communicating_sequential_processes)
windwarrior
@windwarrior
Feb 26 2016 21:16
Oeeh formal verification
People often tell me its a joke outside of academia
huh, wtf, gitter? öö
heh
Insults will be ignored.
smiley
@codemasher
Feb 26 2016 21:32
haha
If you have any comments, suggestions or insults please forward them to krakjoe@php.net
also good
thats why i actually like the php folks :D
(that's a great line for any repo description^^)
because it's got that subtle "haters gonna hate" in it
windwarrior
@windwarrior
Feb 26 2016 21:42
Doesnt PHP have a GIL like python?
smiley
@codemasher
Feb 26 2016 21:51
Something being complex, or difficult, is no kind of justification for avoiding it. The complexity of anything should decrease as your knowledge increases, if it does not, then you are not taking in the right kind of information. This is the nature of learning.
wow, wise words
smiley
@codemasher
Feb 26 2016 23:05
oh great, no need for reinventing the wheel, just add fancy https://github.com/krakjoe/pthreads/blob/master/examples/MySQLi.php
FWIW, I definitely think curl_multi will outperform running a bunch of file_get_contents in separate threads
Also shame on you if you're running your own PHP boxes with allow_url_fopen enabled :P