Closed ggordn3r closed 4 years ago
@ggordn3r can you check the cost over the last month? I don't think this is an issue ..
I saw a bill for ~$15 from Google Cloud Platform yesterday. Is that the one?
Yep, that is the one. I'd call it perfectly okay as is. :)
Ok, marking this question as closed.
Trey: The current lag between seeing the checkmark and being able to vote is still 4-5 seconds. I'd like it to be 3 seconds or less. That seems possible based on my experience with captchas on other websites--am I missing something?
Ralph: The problem here is that the function we are using to verify the captcha response (google cloud function) can be kinda slow. A cold start (when not being used often) can be up to 5 seconds. Subsequent requests will be faster. One solution could be that we trigger the function pre-emptively and it is alive by the time you click the button. Not sure how much I like this solution though.
Trey: Hmm... I did notice that it started working faster after my first vote. However, most sessions will be 1 vote in 1 poll, so this will come up pretty often. Thinking out loud, could we have the "Submit my vote" start checking for a response more often once the voter ranks at least 1 choice? Or is that what you mean by "trigger the function preemptively"?
Ralph: We are now preemptively calling the [Captcha response] function every 5 seconds when you enter the page. I think that's fair and should not produce huge costs (but we should watch it). In fact I don't think it will hardly matter at all but I still want to mention it that we are of course calling the function and Google is charging for that.
Trey: I'm going to add a new "question" issue to the main release about whether there's a faster/cheaper way to handle the cloud function, so we remember to check the spend and performance one more time before declaring 2.0 done.
~ Quoted from the comments of #109