cahing data in data entties versus getting the data from the database.

  • Thread starter Thread starter ajit goel
  • Start date Start date
A

ajit goel

Hi everyone;

The application that we are developing is a 3 tier application using
sybase compact database in the offline mode on Pocket PC.

One of the recommendations that Microsoft has provided for .Net
Compact Framework is

1. Defer data loading until it is required, discard when data no
longer in use
2. Minimize data in memory at any time

In our application, we have implemented caching data in the memory as
data entities(We have created custom data entity managers to do this)
instead of getting it from the database. The data will be cached for
the particular process i.e across forms.

Is the approach that we are taking correct from the performance
perspective??. I am not too sure as both the data entities and the
database are in memory but I have heard from my team members that
performance increased by a factor of 5 when they used cached data
instead of getting it from the database.

Comments and suggestions are highly welcome.

Kind Regards;

Ajit Goel
 
Hi

Could you explain what you mean by "data Entities" ....? Maybe then I can comment

Trevor.
 
Thanks Trevor for your answer;

By "data Entities", I mean custom classes which holds data.

a. A application level data entity is a custom class will be filled with
data at the start of the application.This entity will be destroyed at
the application shut down.

b. A process level data entity is a custom class which will be filled
with data at the start of the process.This entity will be destroyed at
the end of the process.

We had a talk with Microsoft about this and they told that they do have
a definite answer for this.

Kind Regards;

Ajit Goel
 
Back
Top