r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[All] except covered in other channels

[unknown: 5]
19-Jan-2005
[702]
Anyone have rebol highlight files for PSPad?
Graham
22-Jan-2005
[703x2]
I'm playing around with mediawiki .. a great little wiki.  Even has 
preferences for your time zone so that you can see when edits were 
done according to your own local reference.
Would be great if such a wiki could be done using Magic.
Terry
22-Jan-2005
[705]
I've questioned this a few times over the years now.. 

If we have a CGI script that uses the mysql protocol, is it necessary 
to load this protocol with every cgi request?  Wouldn't that add 
some burden to the server?
Graham
22-Jan-2005
[706x2]
you probably have a pool of connections which are re-used
forinstance, in Zope, I have a single sql connection which is used 
by all the "cgi" requests.
Terry
22-Jan-2005
[708x2]
But if you want to access a mysql server, the cgi script loads each 
time, right?
loads the mysql protocol, that is.
Graham
22-Jan-2005
[710]
depends on how it is written.
Terry
22-Jan-2005
[711]
can you give me an example of a cgi script that access a db, and 
doesn't load the protocol each time?
Graham
22-Jan-2005
[712]
any Zope cgi script that access a database does that.
Terry
22-Jan-2005
[713]
I'm referring to Rebol
Graham
22-Jan-2005
[714]
if I have a rebol daemon running that has a connection to a odbc 
database, then my rebol cgi script an interact with that.
Terry
22-Jan-2005
[715]
via what, tcp?
Graham
22-Jan-2005
[716]
yes
Terry
22-Jan-2005
[717]
Well, I wonder what has less overhead.. reading a 23kb protocol with 
each call, or taking the time to do a tcp call?
Graham
22-Jan-2005
[718x2]
clearly the latter
my portal does this .. keeps an open sql connection which is used 
by incoming requests
Terry
22-Jan-2005
[720]
what do you use, rugby?
Graham
22-Jan-2005
[721]
yes.
Terry
22-Jan-2005
[722]
What is faster, reading a 100 byte text file, or accessing 100 bytes 
from a DB?
Graham
22-Jan-2005
[723]
you would have to do timing studies on questions like this ...
Terry
22-Jan-2005
[724]
Yeah, just doing that now.
Graham
22-Jan-2005
[725x3]
after a text file being read from a directory is another db operation.
after all ..
the filing system is a database
Terry
22-Jan-2005
[728x4]
is it?
Ok, doing some timing tests.. using 10000 loops... 


Firstly, the mysql is choking around the 9800 -9850 mark by denying 
access at that point...
(i think my test code is messed up)
Actually, i was counting down, and mySQL is choking after 150 calls 
or so.
Graham
22-Jan-2005
[732]
are you waiting for responses before you call it again?
Terry
22-Jan-2005
[733x2]
Forced to reduce the number of iterations to 100 for mysql sake.. 
and even then it would choke 50% of the time.. results.. 


Reading the DB used mysql-protocol.r with join mysql://.. localhost 
{select email from table where name='name' }
Reading the file used a: load %file.txt, b: select a 'email
mysql - 1.35 seconds (using time/now/precise

file - 0 seconds (timestart - 18:35:25.531, timefinish - 18:35:25.531)


Conclusion.. no contest.. loading and selecting from file wins hands 
down.
Graham, if i need to wait for a response, then i would need to add 
that time to the total for mysql.
Graham
22-Jan-2005
[735]
and if you have 1million files in the local directory?
Terry
22-Jan-2005
[736x3]
good question... and one million files in the DB as well.
10000 iterations using the load file method.. 0:00:00.781
I doubt very much that the DB could do that.
Graham
22-Jan-2005
[739]
and then later on if you need to copy the 1million files from the 
filing system, or copy the mysql database .. which is faster?
Terry
22-Jan-2005
[740x3]
another good point.. think ill load up a directory with a few 100,000 
files and see what happens ;)
If you dont' here from me, you'll know that I mashed my drive :)
hear, that is
Graham
22-Jan-2005
[743]
well, copying the messages from ios took absolutely ages ...
Terry
22-Jan-2005
[744x2]
10,000 iterations .. folder has 100,000 27byte files  - 0:00:00.765 
seconds
Took awhile to create 100,000 27 byte files.. long after the rebol 
script had finished, the os was still handling the cache...
Size: 2.57mb
Size on Disk: 390 mb
Graham
22-Jan-2005
[746]
but we needed 28 byte files to test this out!
Terry
22-Jan-2005
[747]
I think the results speak volumes.
Graham
22-Jan-2005
[748]
and how much space does the db require to store the same data?
Terry
22-Jan-2005
[749]
don't know
Graham
22-Jan-2005
[750]
Does anyone know how to setup a subject filter in gmail?  Can you 
do wild cards like *[Rebol]* for subject filters?
Terry
22-Jan-2005
[751]
size of DB approx 36 mb.