What we're doing now is executing a query to get N (default 10) random FIDs and then calling fontyourface_get_font() N times, which results in 2*N+1 queries total (other N being done by fontyourface_add_font_tags()).

This is sort of redundant as we're not using those tags anyway. By getting the stuff ourselves, we could reduce db operations to one query.

Comments

Drave Robber’s picture

Assigned: Drave Robber » Unassigned
Status: Active » Needs review
StatusFileSize
new1.38 KB

Anyone wants to take a look at the attached patch? ;)

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

We should probably have more flexible ways to load fonts in fontyourface, so this kind of thing isn't necessary. But until then, this seems like a good solution.

Drave Robber’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.