Danbooru

Something wrong with Danbooru?

Posted under General

now every post I see it says "Remove from favorites" even though I haven't favorited it. they don't appear on my favorites

To favorite it I have to "remove" it and then favorite it

also

I no longer see the "favorited by" list

what's going on?

Updated by albert

I can second these observations. Seems to have occurred immediately after today's scheduled (?) down-time. Also seems to persist after a forced refresh (Ctrl-F5 in most browsers).

Possibly a bug caused by a code update?

Roarzan said:
I no longer see the "favorited by" list

This is intentional. The favorites list is no longer displayed for member accounts in order to speed up the site. This is probably what's causing your first bug.

Just out of curiosity, what magnitude of speedup does this change actually give? I assume it must be pretty sizable if albert chose that of all functions to remove, but it doesn't seem like getting a list of users who've favorited a given post should be that costly an operation.

glasnost said: Just out of curiosity, what magnitude of speedup does this change actually give?

I'm not sure to what caliber, but I think I've definitely seen an improvement. For example, when voting on, favoriting, and approving/hiding posts, the actions seems to be taken instantly now. Before, there was always at least a two-second delay for me.

On a similar note, has Safebooru been down for the last few days for the same reason?

Bapabooiee said:
I'm not sure to what caliber, but I think I've definitely seen an improvement. For example, when voting on, favoriting, and approving/hiding posts, the actions seems to be taken instantly now. Before, there was always at least a two-second delay for me.

On a similar note, has Safebooru been down for the last few days for the same reason?

Safebooru has been down to fix bugs, or so it says on twitter.

glasnost said stuff

I imagine the speed-up for removing favourites display would be pretty sizable.

As it currently stands (with the "Add to/Remove from Favourites" display currently 'broken'), loading any given post ought to no longer require any examination of whatever many-to-many relationship contains who has favourited what. Assuming our usernames are also primary keys, loading comments and the name of the uploader/approver shouldn't require examining the user table, either.

Two or so fewer lookups is a sizable advantage, I imagine, and the Add/Remove display is probably disabled until a better solution is implemented (giving each user a table? I dunno).

Yes, it's been restricted to privileged users for now. It was definitely slow when testing on my laptop, averaging 100-200ms on my laptop, and it dwarfed all other queries on the post/show page. Eventually I'll have to start caching the favorites list on posts, but I'll also likely need to partition the favorites table in some way and I'm still trying to figure out what the best method would be.

I know note deletion is broken. I'll look into it tomorrow.

1