I've been working on a fairly simple CMS for a fairly small site. Each page
is a DB query to grab the content for the page.
I also have some ancillary content that isn't specifically associated with
one specific page. For instance, the page footer, which is the same on every
page.
The authors can edit this content which is then stored in the DB. In terms
of retrieving it, I could query the DB on each request, or whenever the
content is changed via the admin tools, I could have it spit it out as a
text file, and then include the file with a plain-old include statement on
each page.
Performance-wise, is there a difference between the two? Is the effor to
write out the new text file from the DB worth any performance gain?
I realize this is probably hypothetic on the size of site I'm working on,
but i'd like to go ahead and use the best method if there is one.
-Darrel 3 1993
If the content ultimately resides in the DB, I'd avoid spitting out
the text files - that might be messy to clean up and the performance
gain would not be worth the effort.
A simpler solution would be to use memory caching (I'm assuming the
content is relatively small). You could keep the content itself in the
cache as a string to write into the page, or you could place the
content into a user control and use partial page caching.
Some more caching info: http://msdn.microsoft.com/library/de...sbestpract.asp
--
Scott http://www.OdeToCode.com/blogs/scott/
On Wed, 10 Nov 2004 22:22:25 -0600, "Darrel" <no*****@nospam .com>
wrote: I've been working on a fairly simple CMS for a fairly small site. Each page is a DB query to grab the content for the page.
I also have some ancillary content that isn't specifically associated with one specific page. For instance, the page footer, which is the same on every page.
The authors can edit this content which is then stored in the DB. In terms of retrieving it, I could query the DB on each request, or whenever the content is changed via the admin tools, I could have it spit it out as a text file, and then include the file with a plain-old include statement on each page.
Performance-wise, is there a difference between the two? Is the effor to write out the new text file from the DB worth any performance gain?
I realize this is probably hypothetic on the size of site I'm working on, but i'd like to go ahead and use the best method if there is one.
-Darrel
> If the content ultimately resides in the DB, I'd avoid spitting out the text files - that might be messy to clean up and the performance gain would not be worth the effort.
Thanks, Scott. I'll look into the cacheing option.
-Darrel
If the content is more or less static, you could read it either from a file
or DB, and store it in the Application Cache, to minimize IO cost.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Darrel" <no*****@nospam .com> wrote in message
news:##******** ******@tk2msftn gp13.phx.gbl... I've been working on a fairly simple CMS for a fairly small site. Each
page is a DB query to grab the content for the page.
I also have some ancillary content that isn't specifically associated with one specific page. For instance, the page footer, which is the same on
every page.
The authors can edit this content which is then stored in the DB. In terms of retrieving it, I could query the DB on each request, or whenever the content is changed via the admin tools, I could have it spit it out as a text file, and then include the file with a plain-old include statement on each page.
Performance-wise, is there a difference between the two? Is the effor to write out the new text file from the DB worth any performance gain?
I realize this is probably hypothetic on the size of site I'm working on, but i'd like to go ahead and use the best method if there is one.
-Darrel
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeff Pritchard |
last post by:
I have an MDB that contains a single table. Checkweigher data is being
continuously written to this MDB from a dedicated workstation over a network
into the MDB on the server at the rate of about 120 records a minute. This
may increase in the future to about 200. The records are not large.
We have other workstations that run sessions on Terminal Server querying
this MDB, doing things like plotting the last hours data on a graph or...
|
by: Rajorshi Biswas |
last post by:
Hi folks,
Suppose I have a large (1 GB) text file which I want to read in
reverse. The number of characters I want to read at a time is
insignificant. I'm confused as to how best to do it. Upon browsing
through this group and other sources on the web, it seems that there
are many ways to do it.
Some suggest that simply fseek'ing to 8K bytes before the end of file,
and going backwards is the way. In this case, am I guaranteed best
results...
|
by: Einar Høst |
last post by:
Hi,
I'm reading data from a text file, and having read a bit on performance and
memory, I'm wondering how it could be done in the fastest, most frugal way.
The data comes in messages, one per line, in a text file. I'm interested in
one of six messages, but I don't think there's any guarantee in the ordering
of the messages. Each message is identified by the first six characters in
the line.
|
by: Einar Høst |
last post by:
Hi
I'm trying to learn a bit about performance, hope someone can help me out
I have a text file with 8-bit characters in it. In order to improve performance, I'm using a BinaryReader instead of a StreamReader. I've made two versions of my method, one which uses typesafe code, and one which uses unsafe code with pointers. I've read several places that direct pointer access will eliminate bounds-checking when accessing an array, and would...
|
by: mloichate |
last post by:
I must read a very heavy-weight text plain file (usually .txt
extension) )and replace a given character with another given character
in all text inside the file. My application was working pretty well
with this below shown code (code placed in a buttonclick event after
selecting the file in a normal OpenFileDialog):
---------------------------------
System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\1.txt");
string all =...
| |
by: John Dann |
last post by:
I'm trying to read some binary data from a file created by another
program. I know the binary file format but can't change or control the
format. The binary data is organised such that it should populate a
series of structures of specified variable composition.
I have the structures created OK, but actually reading the files is
giving me an error. Can I ask a simple question to start with:
I'm trying to read the file using the...
|
by: lizii |
last post by:
i have a file - which on each line has some data i need to fill into a
box - now although reading in the data is simple enough and putting it
in the correct box will be no problem, as i can just read a lilne then
put into the corresponding box...it just seems like a task i should be
able to complete in a few lines...rather than quite a few commands.
for example what i do at the moment is:
read a line
place into first text box
|
by: arne.muller |
last post by:
Hello,
I've come across some problems reading strucutres from binary files.
Basically I've some strutures
typedef struct {
int i;
double x;
int n;
double *mz;
|
by: swetha |
last post by:
HI Every1,
I have a problem in reading a binary file.
Actually i want a C program which reads in the data from a file which
is in binary format and i want to update values in it.
The file consists of structures of type----
struct record {
int acountnum;
char name;
float value;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |