Options

Editing keywords slow? AJAX refresh problems?

darryldarryl Registered Users Posts: 997 Major grins
edited May 19, 2009 in Bug Reporting
Does anybody else ever have problems like the following?

I was doing some keyword cleanup today, and a lot of times after making a change (replacing, adding, deleting), the changes would not immediately show up after clicking Save. However if I clicked on "edit", the keywords would be correct.

There was a similar delay using the Bulk Caption/Keyword Tool.

For bulk changes, I understand that some of these actions may be cached, and stuff has to reindex, whatever.

But the place where it's most disconcerting is where it seems most avoidable. If I've just edited a field, shouldn't that data be available immediately, and that's what should show up after I click Save? I guess it's just AJAX wonkiness, but I haven't seen problems like this on ... Flickr, for instance, whose database of keywords is arguably waaaay bigger.

Anyways, I wanted to try using the [thread=89237]bookmarklet keyword shortcut hack[/thread], but the results I was getting (including completely losing some tags when trying to add more than 2-3 tags to a single photo) made it totally unreliable. I don't think it was all the hack's fault -- I think it had something to do with the AJAX lag.

Bummer. I'm currently starting to work on a Facebook-style pop-up tag editor for SmugMug (choose from a set list of tags, auto-narrow the list as you type). Ideally I could've just stayed all in JavaScript to pull the existing keywords, edited them and then post them back. But I've decided the AJAX calls are far too unreliable, so now I'm thinking of something far more hackish: open up my editor in an iframe that talks to my own server that will do all the keyword pulling and posting via the more reliable API.

Comments

  • Options
    PBolchoverPBolchover Registered Users Posts: 909 Major grins
    edited May 4, 2009
    As I understand it, it's due to lag in the database. The keywords only appear underneath the photos once those keywords have been indexed in the database, and the photos are available in a keyword search etc.

    A couple of weeks ago, when smugmug were recovering from their database server crash, it took several hours for keywords to appear underneath the photos.
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited May 19, 2009
    PBolchover wrote:
    As I understand it, it's due to lag in the database. The keywords only appear underneath the photos once those keywords have been indexed in the database, and the photos are available in a keyword search etc.

    A couple of weeks ago, when smugmug were recovering from their database server crash, it took several hours for keywords to appear underneath the photos.

    Well, what's lame is that even after a reload, the data is almost always correct in the edit box. So why is that same data not available for display underneath the photo itself?

    That's not a database issue. That's a broken Javascript issue.

    Yo Andy -- can you please move this into Bug Reporting? I'd be happy to follow-up with a thorough "Steps to Reproduce" bug report.
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 19, 2009
    darryl wrote:
    Well, what's lame is that even after a reload, the data is almost always correct in the edit box. So why is that same data not available for display underneath the photo itself?

    That's not a database issue. That's a broken Javascript issue.

    Yo Andy -- can you please move this into Bug Reporting? I'd be happy to follow-up with a thorough "Steps to Reproduce" bug report.

    Darryl,

    The keyword string is always updated (and correct) at the time of submission, but the actual keyword handling (ie. updating the individual keywords) is processed from a queue. after an outage like today it is common for keywords to be lagged while we catch up.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited May 19, 2009
    devbobo wrote:
    Darryl,

    The keyword string is always updated (and correct) at the time of submission, but the actual keyword handling (ie. updating the individual keywords) is processed from a queue. after an outage like today it is common for keywords to be lagged while we catch up.

    Cheers,

    David

    David: What's odd is that I can do a shift-reload to force a page to reload (no cache), but the edits or new keywords don't show up. But when I click on Add or Edit, the changes are there in the field?

    I suppose it's possible that the Javascript variable persists through a full page reload.

    And I swear that I've made edits on multiple photos and when I go back, the old Keywords are still displayed but clicking Edit shows the correct values.

    But it's weird. It's like your calls to the database for editing keywords get more up-to-date information than whatever calls are being made to *display* the keywords.

    Another thing that happens: the Keyword div (?) disappears completely when moving through from certain screens to others. I need to find the exact steps to replicate (it seems to happen a lot of you're viewing in Keyword view, maybe clicking on Lightbox and then back to gallery view.)

    Overall, the keyword display code has always felt pretty janky to me. Which is a shame.
Sign In or Register to comment.