pc

> Database optimization

In the spirit of optimizing the database access and simplifying the adding of new files to the website, I have replaced all of the file size displays on the site with calls to a custom function. The function gets the file size in bytes using filesize($filename) and the rest of my function determines if it should be displayed as bytes, kilobytes, or megabytes. Thus, I was able to eliminate the filesize field from every table in the database. Groovy, isn't it?

Update: I just did the same with the gallery page. The image and wallpaper resolution is now determined by getimagesize($filename), eliminating the resolution field from the image table.


11:10:16pm EST 07.10.2006 <

View By Category

news General

pc PC/Software

games Gaming

books Books

movies Movies

comment Blog