Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

AJAX Improvements in List page while CSVs are importing
  • Vote Up0Vote Down guidodguidod
    Posts: 19Sendy user

    When you've uploaded several CSVs and load the lists page to monitor import status, the lots of AJAX requests triggered by that list will end up slowing down the import itself.

    Sendy seems to be asking for the progress of each pending list individually every 0.5 seconds or so, even though a single list gets processed at once (so most requests will return "0" as a result). After a couple of minutes, Chrome Inspector shows ~5000 ajax requests.

    If Sendy only checked via AJAX a single list at a time we would reduce the requests significantly. Also, the interval between each check seems to be too frequent. It could wait much longer than 0.5 seconds (say, 5 seconds) and we'd be just fine. For 10 simultaneous CSV imports, that would axe the requests from 1200 requests every minute to just 12 requests.

    (Sorry if I misdiagnosed the issue)

  • 5 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,507Sendy support

    Hi @guidod,

    Sendy seems to be asking for the progress of each pending list individually every 0.5 seconds or so

    That is simply not true. Sendy queries the progress every 2 seconds instead of 0.5 seconds. 5 seconds is too long, 2 seconds is just perfect.

    Lastly, if you don't want the AJAX script to query the database for progress while your CSV is importing, just switch away to another page or close Sendy's tab/window and check back later.

    Thanks.

    Ben

  • Vote Up0Vote Down guidodguidod
    Posts: 19Sendy user

    Thanks @Ben,

    The seconds difference is probably Chrome Inspector doing weird stuff, but still I would recommend trying to reduce and space out these AJAX requests (only one for all lists, selecting the progress of in_process lists in a single query).

    There's an advantage in having the lists page open to monitor progress, but if it bothers the database so much it's better to keep it closed and remember to open it every once in a while. Reducing/consolidating ajax requests could improve this significantly.

    I've just started with Sendy, and wanted to post the few hiccups I'm encountering as suggestions, since they might help future users (and thus your business!) if improved.

    As said elsewhere, great app! Guido

  • Vote Up0Vote Down BenBen
    Posts: 3,507Sendy support

    Hi @guidod,

    Thanks for your suggestion, I appreciate it. Are you uploading multiple CSVs at one time?

    Thanks.

    Ben

  • Vote Up0Vote Down guidodguidod
    Posts: 19Sendy user

    Yup.

    By the way, related bug/issue: Sendy does not allow you to queue multiple CSVs for the same list, it always replaces the previous queued CSV with the newest uploaded one. I understand this is reasonable and good enough, but the interface should clarify it: if I try to use the import CSV form for a list that's still being processed, I should be warned that uploading a CSV will replace the previous one.

  • Vote Up0Vote Down BenBen
    Posts: 3,507Sendy support

    @guidod,

    if I try to use the import CSV form for a list that's still being processed, I should be warned that uploading a CSV will replace the previous one.

    Will do. I'm not sure why but it didn't come across to me anyone would import another CSV in the same list when there's already a CSV importing on the same list. Well I guess I'll have to cater to that as well.

    Ben