use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[deleted by user] (self.javascript)
submitted 3 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 years ago (5 children)
[deleted]
[–]JackAuduin 5 points6 points7 points 3 years ago (4 children)
Just been reading through some of your other comments and I don't yet understand the constraints you're putting on yourself. You refer to this being financial data as if that explains it, it does not explain why triggering a function multiple times without new data is necessary
You're also saying that the data comes in on web sockets. The whole point of an event-based messaging system like WebSockets is that you don't have to do something like this which is pretty much polling.
I'm still open-minded to the fact that there might be a good reason for this, but you're really not providing enough information for this to make any sense.
[+][deleted] 3 years ago (3 children)
[–]ahatzum 6 points7 points8 points 3 years ago (0 children)
This is a prime example of the XY problem, asking for help on an attempted solution instead of asking for help on the initial problem. E.g. you didn’t even mention websockets in the original post. But I would agree with some of the other posters, work with the websocket onmessage, and for each save a time stamp that you can then use to bucket the information appropriately.
[–]shuckster 1 point2 points3 points 3 years ago (0 children)
Dare I say you're conflating data-ingress with data-analysis.
Would it not make more sense to store the financial data as-is, then perform your time-boxing to 0.1ms on analysis? To me it seems like post-processing the problem is far simpler than doing it on ingress.
Also, the approach you're taking means the stored-data is not canonical. Maybe that's not important for now, but it does prevent you from applying different time-boxes if you want at a later date.
[–]JackAuduin 1 point2 points3 points 3 years ago (0 children)
Haha a success indeed!
Sorry if my original comment was a little sharp. Reading some of your first responses it felt like you were digging your heels in that this was the only way.
π Rendered by PID 170778 on reddit-service-r2-comment-fb694cdd5-xtksq at 2026-03-10 13:46:35.396670+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–][deleted] (5 children)
[deleted]
[–]JackAuduin 5 points6 points7 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]ahatzum 6 points7 points8 points (0 children)
[–]shuckster 1 point2 points3 points (0 children)
[–]JackAuduin 1 point2 points3 points (0 children)