« first day (3021 days earlier)      last day (1927 days later) » 

10:00 PM
@towc dude I'm only replying....
 
@paul23 Here is a JSON.parse reviver that turns objects into maps: jsfiddle.net/s5t8bqyz
 
that's all
 
@KevinB what do you suggest I try to narrow it down, client vs server side?
 
I don't like when ppl give me cold shoulder, so I reply that's all it is haha
 
@RTarson even if your intentions might be good, what you just did again, I don't perceive as being nice
now, things are fine
you're very welcome here
 
10:03 PM
yo what did I do wrong I don't get it
 
you're all so weird
 
chatroom? or silent room?
 
I personally don't appreciate "bud", "guy", "dude", and "yo", in this context
I'm very confused by what made you say "dude I'm only replying"
 
meaning I'm responding to what you said or remarked
honestly bought to just fucking leave cause of how petty this is "personally don't appreciate "bud", "guy", "dude", and "yo""
 
I made a friendly statement asking to have less of "guy" or "bud", I didn't expect it to be replied with "dude" and in a way that made it sound like I did something bad
 
10:06 PM
@david thanks, learned that I can provide a second argument to the parser. `
 
again, you're very welcome here
I'll just not personally interact with you for a while, and above are the reasons why
I'm not a room owner or figurehead of any kind, just a regular. I have no authority, I just have personal rules
sounds good?
 
different culture maybe but when I cashout sometimes someone says "have a nice day bud". I don't go "not your bud". I say "you too"
 
only bullies call me "bud" here
 
the argument is fucking stupid
I don't have time for this bs im out
 
again, you're very welcome to simply not interact with me
I'm not trying to be condescending or passive-aggressive, or aggressive
I'm sorry if it looks that way
 
10:14 PM
appearances are important towc, if people think you're being condescending or passive-aggressive then that's what they will remember, not your intentions.
 
sorry, got busy. The timeline, does each entry have a longer "wait" period?
 
@KevinB is that question directed at me?
 
Hello
 
@JBis Hello!
@RTarson let me know if you need any help. I'll do the best I can
 
10:33 PM
@DavidKamer Thanks David, idk im thinking of scraping and trying something new. But if you'd like to look I don't mind sending a link to my project
 
@KevinB So I did some instrumentation on my code. Each promise takes ~ 600ms to resolve.
 
@RTarson I might not need to look, are you doing something with graphics?
 
@DavidKamer yes
 
@RTarson 3d graphics?
 
@DavidKamer 2d
 
10:37 PM
Canvas is probably okay with that.
hardly anyone does anything directly in webgl
 
@david which is also my point
 
it's not standard to use it directly, just as it isn't standard to directly interact with any gl library during, say, game development
@RTarson you could use canvas and svg and probably get what you want out of it
 
@DavidKamer yeah that is what I'm using now is canvas.
 
@DavidKamer That isn't?
 
@NathanJones There's two things you can look at. If you log the timestamp on each iteration, you can easily prove that the code you are running isn't delaying between each call
 
10:39 PM
@KevinB right, I used console.time to measure the time it takes for each Promise to resolve.
 
next you can look at the timeline to see when each connection began connecting, and when each one finished
not resolve
start
 
@paul23 no. That's why we use tools to build games and graphics. Game engines exist to abstract stuff like GL
 
@KevinB yeah, I've looked at that too. I can see the grey bars do not overlap.
 
the resolve happens asynchronously regardless
 
@DavidKamer Kinda new with working with canvas.. getting the hang of it though. just my patience with trying new things haha
 
10:40 PM
In the Network tab, under the waterfall column
 
@RTarson yeah, you should expect 10+ hours to learn canvas imo. More if you don't know JavaScript
 
if there's n o overlap, no "wait", it's likely clientside
Nothing in your code would cause that
it's just how the methods you are using work
 
I thought most major titles were actually written "in house", so directly using opengl/directx. Heck I know that modern games like warcraft 3 actually have parts still written in assembly to speed up drawing.
 
@paul23 you're not wrong, but that is for multi-million dollar games
 
but if it is synchronous... that's surprising to me
 
10:41 PM
do you think we're talking about how to build a multi-million dollar game lol?
 
@DavidKamer I can definitely see that haha. So you think working directly with canvas is better then using webgl?
 
It's one of the places where learning skills to act on the "bare metal" is still important. Even for trivial tasks.
 
@RTarson I'd say that if you plan on building games it couldn't hurt to know webgl, but canvas is probably the right tool for this specific job
 
@KevinB I'll play around with it some more. I wonder if the fact that I create the WebSocket object outside of the Promise has something to do with it.
 
it doesn't
the promise doesn't help or hurt the situation
 
10:43 PM
ah ok
 
@DavidKamer no, but there's a great world between "writing the engine yourself and optimizing the assembly" and "using an engine to abstract away all drawing".
 
@paul23 I'm not saying abstract away all drawing. I'm saying use tools that are available.
You can draw something in blender and use it in something like three.js
 
@NathanJones @KevinB I feel like a screenshot of the waterfall would help a bit
 
@david is that the potentially helpful bit?
 
Are you using a websocket library
it just seems odd to me that this would function synchronously
 
10:50 PM
@KevinB Not as far as I know, just the developer.mozilla.org/en-US/docs/Web/API/WebSocket object
 
Has someone noticed how the recent version of chrome disabled keyboard shortcuts when a text input element is focused?
 
then there's probably nothing you can do about it, at least on the client.
 
Also, I'm using the built-in Promise.all, not Bluebird's. Not sure if that matters.
 
which keyboard shortcuts?
 
Are there any ws clients that open connections asynchronously?
 
10:53 PM
shouldn't be
all should be using the browser's api
if you can't do it directly through that api, no library can
 
they can mock them with fallbacks (long polling)
 
This isn't how arrays of promises normally work, right?
 
the promise isn't related to your issue
 
has code been posted?
 
1 hour ago, by Nathan Jones
let socket1 = connectTypeaheadSocket(url1);
let socket2 = connectTypeaheadSocket(url2);

[socket1, socket2] = Promise.all([socket1, socket2]);
1 hour ago, by Nathan Jones
function connectTypeaheadSocket(url) {
    const typeaheadSocket = new WebSocket(url);
    return new Promise((resolve, reject) => {
        if (typeaheadSocket.readyState === 1) {
            resolve(typeaheadSocket);
        }
        typeaheadSocket.onopen = () => resolve(typeaheadSocket);
        typeaheadSocket.onerror = err => reject(err);
    });
}
 
10:56 PM
uhh
> [socket1, socket2] = Promise.all([socket1, socket2]);
that will return the promise
await
 
but in the end we're initializing the two sockets simultaneously, there shouldn't be a delay in the network tab like he's seeing imo
 
the promise is going to be returned immediatly.
over writing the values of the socket1/2
I wouldn't expect anything to work as expected
 
that whole line could probably be commented out, and you'd still see the same waterfall effect in the timeline
 
user1596138
@DavidKamer Kind of
 
@rlemon Sorry, my snippet was wrong, the code is right. It has the await keyword.
 
10:59 PM
@Jhawins there is a really weird documentary about root canals that I can't tell is legit or not
 
@NathanJones where?
just to be sure
 
here's the img for that timleine
 
is the server waiting for an upgrade header?
 
@rlemon not sure how to check that. Does the Network tab show that?
 
yes, 101
I haven't seen that personally.. the waterfall
but it's worth looking at.
okay, so it looks like the server is responding with the upgrade switch..
 
11:03 PM
Yes, all of the WS requests are getting 101 responses
 
Zirak has removed Zirak from the list of this room's owners.
2
 
laters
 
@rlemon I'm using gunicorn to run uvicorn workers
 
💀
 
@NathanJones I don't know what that means, but it looks like the 101 is expected I guess. I haven't payed much attention to it before.
so ignore that.
 
11:06 PM
gunicorn -b 0.0.0.0:8000 -w 4 -k uvicorn.workers.UvicornWorker config.asgi:application is the CMD of my container that's running this server.
With django-channels
stackoverflow.com/a/22418369/690573 says 101 means the connections is progressing
console.log('creating acctIndexSocket');
let acctIndexSocket = connectTypeaheadSocket(
  `${websocketUrl}/ws/hourly-hire/typeahead/foapal/`
);

console.log('creating acctSocket');
let acctSocket = connectTypeaheadSocket(
  `${websocketUrl}/ws/hourly-hire/typeahead/foapal/`
);

console.log('creating fundSocket');
let fundSocket = connectTypeaheadSocket(
  `${websocketUrl}/ws/hourly-hire/typeahead/fund/`
);

console.log('creating orgnSocket');
let orgnSocket = connectTypeaheadSocket(
  `${websocketUrl}/ws/hourly-hire/typeahead/orgn/`
^ That's the real code
15:46:49.468 hourlyHire.088ae6155a7cb69bd707.js:1 creating acctIndexSocket
15:46:49.469 hourlyHire.088ae6155a7cb69bd707.js:1 creating acctSocket
15:46:49.471 hourlyHire.088ae6155a7cb69bd707.js:1 creating fundSocket
15:46:49.472 hourlyHire.088ae6155a7cb69bd707.js:1 creating orgnSocket
15:46:49.473 hourlyHire.088ae6155a7cb69bd707.js:1 creating progSocket
15:46:49.475 hourlyHire.088ae6155a7cb69bd707.js:1 creating actvSocket
15:46:53.308 hourlyHire.088ae6155a7cb69bd707.js:1 done!
^ console output
Maybe @BenjaminGruenbaum could help with this? I summon you!
 
why so many sockets?
 
@rlemon We have multiple apps that can reuse the same socket for each typeahead field
I initially wrote this app so that all of the typeahead fields used the same socket, for this exact reason, but I was then directed to split each field into its own socket so it's more re-usable
(I'm starting to wonder if a GraphQL server would be a good fit for this, but that's beside the point)
@rlemon did that make sense?
 
user1596138
11:34 PM
@Zirak One by one the weak fall
3
 
user1596138
@NathanJones are you using ws:// or wss://
 
@Jhawins ws://
 
user1596138
Then expect a 101 when you are upgraded to wss
 
This is a testing environment, in production it will be wss://
 
user1596138
The browser will do this by default if possible
 
user1596138
11:36 PM
I didn't read enough. I dn't know what's going on. Carry on
 
Could the fact that I'm using ws:// be causing the original waterfall issue?
 
user1596138
Have youj MVCEd yet?
 
user1596138
Make 8 sockets to the same URL. No Promises.
 
@Jhawins I have not, I'll try that now
 
user1596138
I've never opened multiple WS simultaneously
 
user1596138
11:42 PM
Also is that actually opening mutliple sockets to the same host??
 
user1596138
I thought a server/client could only have 1 socket connected at a time. Short of using a fake socket library
 
user1596138
That would explain the waterfall.. If each proceeding socket is destroying the previous
 
@Jhawins maybe for the same URL, but I don't think that's true for a host
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
new WebSocket(`${websocketUrl}/ws/hourly-hire/typeahead/foapal/`);
^ still gives me a waterfall
 
user1596138
Well that makes your problem a whole lot simpler at least
 
Looks to me like it's backend related
Or that's just how the WebSocket object works
I could try a different client like: github.com/websockets/ws
Nevermind, I didn't read the docs closely enough: "Browser clients must use the native WebSocket object."
Probably a stupid idea, but, would Web Workers be helpful here?
 
user1596138
11:54 PM
Socket.io
 
user1596138
Is that project still around?
 
user1596138
Haha haven't heard of that since Runnable died
 
probably
i mean
i have an app that still uses it
hasn't been updated in years
 

« first day (3021 days earlier)      last day (1927 days later) »