Skip Menu |

This queue is for tickets about the File-Cache CPAN distribution.

Report information
The Basics
Id: 104272
Status: open
Priority: 0/
Queue: File-Cache

People
Owner: Nobody in particular
Requestors: rafaeljose [...] zoho.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: very slow reads
Date: Wed, 6 May 2015 16:48:22 -0300
To: <bug-File-Cache [...] rt.cpan.org>
From: "Rafael Jose" <rafaeljose [...] zoho.com>
The MySql loop in my specific case completes about 7.5 times faster than the cache file loop. Did i miss the point of the module or is it a bug? PSEUDO LOOP 0 TO about 100 { $sql = q(SELECT count(*) from users WHERE something=? AND somelese=?); $sth = $dbh->prepare($sql); $sth->execute($a,$b); $cnt = $sth->fetchrow_arrayref->[0]; $sth->finish; } PSEUDO LOOP 0 TO ABOUT 100 { $cnt = $cache->get($USER) }
File::Cache is very old and slow. Switch to CHI. On Wed May 06 15:48:56 2015, rafaeljose@zoho.com wrote: Show quoted text
> The MySql loop in my specific case completes about 7.5 times faster > than the cache file loop. > Did i miss the point of the module or is it a bug? > > > PSEUDO LOOP 0 TO about 100 { > > $sql = q(SELECT count(*) from users WHERE something=? AND somelese=?); > $sth = $dbh->prepare($sql); > $sth->execute($a,$b); > $cnt = $sth->fetchrow_arrayref->[0]; > $sth->finish; > > } > > > PSEUDO LOOP 0 TO ABOUT 100 { > > $cnt = $cache->get($USER) > > }
Subject: Re: [rt.cpan.org #104272] AutoReply: very slow reads
Date: Thu, 7 May 2015 04:18:11 -0300
To: <bug-File-Cache [...] rt.cpan.org>
From: "Rafael Jose" <rafaeljose [...] zoho.com>
Thanks for the informartion, CHI file works very fast. You should mark File-Cache as deprecated and suggest the CHI instead as it can be easily implemented over existing File-Cache code. Show quoted text
-----Mensagem Original----- From: Bugs in File-Cache via RT Sent: Wednesday, May 06, 2015 4:48 PM To: rafaeljose@zoho.com Subject: [rt.cpan.org #104272] AutoReply: very slow reads Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "very slow reads", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #104272]. Your ticket is accessible on the web at: https://rt.cpan.org/Ticket/Display.html?id=104272 Please include the string: [rt.cpan.org #104272] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-File-Cache@rt.cpan.org ------------------------------------------------------------------------- The MySql loop in my specific case completes about 7.5 times faster than the cache file loop. Did i miss the point of the module or is it a bug? PSEUDO LOOP 0 TO about 100 { $sql = q(SELECT count(*) from users WHERE something=? AND somelese=?); $sth = $dbh->prepare($sql); $sth->execute($a,$b); $cnt = $sth->fetchrow_arrayref->[0]; $sth->finish; } PSEUDO LOOP 0 TO ABOUT 100 { $cnt = $cache->get($USER) }