philipmulcahy / azad

amazon order history reporter chrome extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is one, two and three months feature as efficient as it could be? (No)

philipmulcahy opened this issue · comments

See #133, where post-release @TrtlyUndrCtrl has supplied console logs. I asserted (before getting the logs) that azad is supposed to not fetch order details for orders whose dates are outside the date window, but that it IS supposed to know order IDs and dates (the info shown in the 10 orders at a time summary pages) for all of the orders in either one or two years, depending on whether the 1/2/3 month period selected spans a year boundary.

This issue covers:

  1. analysing (grepping and counting?) @TrtlyUndrCtrl's log files to see if observed behaviour deviates from my intentions above.
  2. potentially fixing any deviation (unless it gets too involved and needs more issues).
  3. discussion of possible further efficiency improvements.

I now have the logs and the ball is in my court: thank you @TrtlyUndrCtrl

grep "scheduler.ts.* Executing"  www.amazon.com-1686750963365.log | wc -l
3350
grep "scheduler.ts.* Executing"  www.amazon.com-1686750963365.log | grep order-history | wc -l
162
grep "scheduler.ts.* Executing"  www.amazon.com-1686750963365.log | grep order-details | wc -l
1594

hmm - assuming your orders are not very unevenly distributed, then this looks like the behaviour is not as I intended - we'd expect more like 300 detail queries.
I will look at code and either send you a debug build with improved logging for another experiment or a trial fix.
I am stuck at home oncall on Saturday, so if my employers are having a quiet day then I should find time...

Philip

I do want to let you know that my account utilizes household teen accounts. I have 4 teen accounts but it rolls all of the orders up on the order screen of the main adult account which is the one I run the extension from. Not sure if that is causing problems but I did want to make sure I disclose that just in case it is

I think I can see where I went wrong. It's not obvious what the best solution is though - I need to ruminate.
Initial thoughts on options are:

  1. lazy evaluation of detail properties
  2. pass a date range filter to getOrdersForYearAndQueryTemplate (and probably rename it as well)

Hello @TrtlyUndrCtrl ,

Here's a test build that looks to be an improvement: azad_57453605.zip,
and here's how to use it.
Please let me know what you think!

Fantastic I will probably be testing it out tomorrow evening. My main job has me working 2nd shift today and then 1st shift tomorrow (exactly 8 hours after we leave we have to be back) so I won't have any time after work tonight. Thank you again for your time and diligence!

So I loaded azad_57453605.zip, but I cannot get it to enable the preview features. I did the "renew log-in if you've paid" and now when I click it the pop-up shows my active subscription, but the extension still shows "Preview/Premium features disabled". I thought perhaps the original extension was messing with it so I removed it. Now even the version available in the Chrome store is doing the same thing.
image

It's totally fine. What I did was just paid for another one under my business e-mail and that actually seemed to do the trick. I am going to test the experimental one now and I will let you know how it goes. Also, I do not expect a refund on that 2nd one. I do plan to actually run this on 2 separate machines so I am ok with paying for it 2 times.

Not an issue at all :) I know how it is with needing more time in a day than exists haha! So, update for you, the 1st run with the experimental one only went through ~650 orders which took significantly less time than before where it was going through more than 3000. So the changes you made appear to have worked!

That did work my friend :) I tested it

1.9.27 is in review with the chrome store - sometimes this can take weeks, but normally it's less than 24h.
I've filed Glench/ExtPay#145, but given we've got a workaround that is invisible to users, I don't think we're blocked.

Now that the totally awesome @TrtlyUndrCtrl has verified the performance fix, I can close this ticket once google let 1.9.27 out the door.