https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • t

    theGagne

    01/25/2021, 6:33 PM
    thinking this could work: https://github.com/openzipkin/zipkin-js
  • d

    Deleted User

    01/25/2021, 7:23 PM
    can you explain more?
  • m

    Matt

    01/25/2021, 7:25 PM
    Not really, I've never done it -- If you're going to have an interactive forum, and want it to run completely in workers, then you're likely going to need to use durable objects (or perhaps hack it together with kv) to store the data etc.
  • d

    Deleted User

    01/25/2021, 7:32 PM
    Do you know about operation based conflict-free database.
  • u

    617a7a

    01/25/2021, 8:58 PM
    Hi guys, I'm getting an
    Copy code
    Uncaught ReferenceError: require is not defined
    error.
  • a

    advaith

    01/25/2021, 9:00 PM
    try using import syntax instead
  • a

    advaith

    01/25/2021, 9:00 PM
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
  • u

    617a7a

    01/25/2021, 9:00 PM
    i'll have a look, ty
  • w

    Walshy | Pages

    01/25/2021, 9:01 PM
    if you aren't using something like webpack you wont be able to require packages
  • u

    617a7a

    01/25/2021, 9:03 PM
    yep, my mistake. that works now 😄
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:10 AM
    Anyone dug into profiling the performance of a Worker script?
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:10 AM
    I see that the Profiler runtime info is available in the DevTools.
  • c

    Ceru ©

    01/26/2021, 12:11 AM
    ive personally noticed they can be slow from time to time but i havent done actual scientific stuff
  • a

    adaptive

    01/26/2021, 12:11 AM
    What are looking for?
  • c

    Ceru ©

    01/26/2021, 12:12 AM
    imo, the performance tab might not be representative of real world speed as its using a single data centre
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:12 AM
    Don't have an actual use-case at the moment, but I imagine it would be useful for folks to see which parts of their scripts are using the bulk of their CPU time.
  • a

    albert-zhao

    01/26/2021, 12:13 AM
    Yeah, the JavaScript Profiler (which is in open beta) in the UI is something we're hoping to support in Wrangler
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:13 AM
    I'm guessing that it's technically possible to grab this profiling data, run it against the source map for the script, and show it against the unminified code, line for line (more or less).
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:13 AM
    Oooh, shiny. Any thoughts on what that'll look like?
  • a

    albert-zhao

    01/26/2021, 12:14 AM
    nothing concrete yet but hopefully it feels as easy as using chrome's dev tools
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:14 AM
    Ah, you mean when using
    wrangler dev
    or something?
    So possibly showing this in a DevTools window directly?
  • g

    ginkoid

    01/26/2021, 12:16 AM
    ooh will it be similar to chrome devtools for node?
  • g

    ginkoid

    01/26/2021, 12:17 AM
    where wrangler exposes a ws for devtools to connect to
  • a

    ai

    01/26/2021, 12:23 AM
    tbh I think that'd be the way to go in the future since there's already so much tech built up around connecting to those devtools endpoints like the VS Code extension for JS debugging
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 12:23 AM
    Yeah, that's kind of where I was leading my questions, to be honest
  • c

    Ceru ©

    01/26/2021, 1:50 AM
    what are the chances of getting TCP connections on Workers?
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 1:51 AM
    Sweeeet
  • g

    Greg Brimble | Cloudflare Pages

    01/26/2021, 1:58 AM
  • a

    albert-zhao

    01/26/2021, 2:08 AM
    Nothing soon, though we want em too
  • c

    Ceru ©

    01/26/2021, 2:08 AM
    hmm, dang
1...697071...2509Latest