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

    Ryder Cragie

    04/12/2023, 7:14 PM
    I know. But if it's there for longer than 2 seconds my head sets on fire. 😂
  • r

    Ryder Cragie

    04/12/2023, 7:34 PM
    @James that code you sent just rewrites www to root.
  • r

    Ryder Cragie

    04/12/2023, 7:34 PM
    Very cool though. Must admit.
  • r

    Ryder Cragie

    04/12/2023, 7:35 PM
    It sends 404's back to https://rydercragie.com though.
  • r

    Ryder Cragie

    04/12/2023, 7:43 PM
    This works though: https://discord.com/channels/595317990191398933/909458221419356210/1095770378556674201 Just seems to spit out occasional timeout errors.
  • r

    Ryder Cragie

    04/12/2023, 7:46 PM
    Never mind. ChatGPT's fixed it by adding this: const response = await fetch(request, { cf: { cacheEverything: true, cacheTtl: 14400 }, timeout: 10000 });
  • g

    Glare

    04/12/2023, 7:47 PM
    Does anyone know what happened to the darkflare GitHub repo?
  • r

    Ryder Cragie

    04/12/2023, 7:50 PM
    Told it to optimise it in addition to that to make it more efficient (as it suggested I should do) and it seems to have done something to it...
  • r

    Ryder Cragie

    04/12/2023, 7:57 PM
    Umm
  • a

    anurag

    04/12/2023, 8:00 PM
    Hi, folks I'm getting this warning
    Copy code
    md
    Total Upload: 4178.69 KiB / gzip: 1457.82 KiB
    â–² [WARNING] We recommend keeping your script less than 1MiB (1024 KiB) after gzip. Exceeding past this can affect cold start time
    Earlier the size was
    Total Upload: 928.13 KiB / gzip: 187.40 KiB
    but it increased a lot after I installed
    langchain
    Could someone please tell me approx how bad this could be?
  • w

    Walshy | Pages

    04/12/2023, 8:00 PM
    You mean Denoflare? Not heard of Darkflare before
  • w

    Walshy | Pages

    04/12/2023, 8:01 PM
    > gzip: 187.40 KiB you're still good right now, the warning is thrown because your uncompressed size is almost 1 MiB > Total Upload: 928.13 KiB But your compressed size (the one that matters) is still only 1/5th of the way there
  • a

    anurag

    04/12/2023, 8:03 PM
    After I installed
    langchain
    the gzip size is
    1457.82 KiB
    Is this too bad?
  • a

    anurag

    04/12/2023, 8:04 PM
    Current size is this
    Copy code
    Total Upload: 4178.69 KiB / gzip: 1457.82 KiB
    â–² [WARNING] We recommend keeping your script less than 1MiB (1024 KiB) after gzip. Exceeding past this can affect cold start time
  • w

    Walshy | Pages

    04/12/2023, 8:04 PM
    Oh I see, I misread
  • w

    Walshy | Pages

    04/12/2023, 8:05 PM
    Ok so if your script isn't cached, you'll have a slower cold start. It won't be very fast for the first request but after that it'll be cached and just as quick as normal. Unless you don't have a request for a while, you won't cold start. So I wouldn't worry too much about it
  • g

    Glare

    04/12/2023, 8:06 PM
    https://discord.com/channels/595317990191398933/783765338692386886/1072266478012866640
  • a

    anurag

    04/12/2023, 8:06 PM
    Got it thanks 🫡
  • w

    Walshy | Pages

    04/12/2023, 8:06 PM
    Ah right, yeah seems they deleted it. You can ping the author in the thread and ask if they've abandoned it
  • m

    Mozzy

    04/12/2023, 8:07 PM
    Looking at the averages on the CPU time here, would I be generally OK within the Workers Bundled tier (50ms CPU time limit)
  • g

    Glare

    04/12/2023, 8:07 PM
    Gotcha.
  • w

    Walshy | Pages

    04/12/2023, 8:08 PM
    Yeah that looks fine to me. Only a few over, you need to be averaging over for it to be a problem
  • m

    Mozzy

    04/12/2023, 8:08 PM
    Okay
  • m

    Mozzy

    04/12/2023, 8:09 PM
    I guess as the D1 DB grows, the more CPU time will be used to fetch it though 😅
  • w

    Walshy | Pages

    04/12/2023, 8:09 PM
    Nah it shouldn't impact your CPU time
  • m

    Mozzy

    04/12/2023, 8:10 PM
    Oh? What is it that's using CPU time then?
  • m

    Mozzy

    04/12/2023, 8:12 PM
    (and I could probably Promise.all() and bulk fetch and all that as well to improve things)
  • w

    Walshy | Pages

    04/12/2023, 8:12 PM
    Hmm that's weird
  • w

    Walshy | Pages

    04/12/2023, 8:13 PM
    Yeah definitely shouldn't be using anywhere near ~40ms for this
  • m

    Mozzy

    04/12/2023, 8:13 PM
    Am I doing something bad here?
1...238923902391...2509Latest