summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Misc.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-10 17:01:02 +0200
committerYorhel <git@yorhel.nl>2009-10-10 17:05:30 +0200
commit0c5a9606dd9047522c4357e36e5fe9081943b947 (patch)
tree494e64618856619e9bf0c4ec2d91e9b4b86d3f59 /lib/VNDB/DB/Misc.pm
parent64007de03cba6c0acb8a2782bc5f86bcad946850 (diff)
List all known languages on /r and /v/all instead of only those in use
Performance improvement of ~15ms for all release and VN browse pages. There are in total 20 known languages in the DB, and 12 of them are actually used (i.e. a release in that language exists). Which means 8 of the listed language filters won't produce any results (yet), but I'd say that's an accaptable trade-off.
Diffstat (limited to 'lib/VNDB/DB/Misc.pm')
-rw-r--r--lib/VNDB/DB/Misc.pm16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/VNDB/DB/Misc.pm b/lib/VNDB/DB/Misc.pm
index eeb860b0..ed3730ee 100644
--- a/lib/VNDB/DB/Misc.pm
+++ b/lib/VNDB/DB/Misc.pm
@@ -6,7 +6,7 @@ use warnings;
use Exporter 'import';
our @EXPORT = qw|
- dbStats dbRevisionInsert dbItemInsert dbRevisionGet dbItemMod dbLanguages dbRandomQuote
+ dbStats dbRevisionInsert dbItemInsert dbRevisionGet dbItemMod dbRandomQuote
|;
@@ -160,20 +160,6 @@ sub dbItemMod {
}
-# Returns a list of languages actually in use
-sub dbLanguages {
- my $self = shift;
- return [
- map $_->{lang}, @{$self->dbAll(q|
- SELECT DISTINCT rl.lang
- FROM releases r
- JOIN releases_lang rl ON rl.rid = r.latest
- WHERE r.hidden = FALSE|
- )}
- ];
-}
-
-
# Returns a random quote (hashref with keys = vid, quote)
sub dbRandomQuote {
return $_[0]->dbRow(q|