Showing posts with label guys. Show all posts
Showing posts with label guys. Show all posts

Thursday, March 29, 2012

Performance of CollectionBase class

Hi Guys,

I have a doubt which is little bit conceptual rather than a coding
convention.

I have a a table called products in which I have 40000 and odd products
which is expected to be frequently
accessed by the website. I'm having doubt in how fast i can serve this
product details to the requesting clients.

Basically, I have created necessary stored procedures to pull out the data
from the database. Now, I'm planning to have
a data access layer called product (a class) which contains properties,
enumerators etc., to load all the product details
by executing the stored procedure. That is, the data access layer will be
used by the business layer to deal with the product
details in the means of populating it in the webpage, filtering etc.,

So, the product class inherits Collectionbase class to have all the
enumerator, indexer funtionalities which is nothing
but a custom data source and which can be used with DataGrid etc., and all
the business logic like how to populate, what
to populate has been written in the business layer (it uses the data layer
to define the bl), which is eventually used by
the web developers to design the dynamic pages of the site.

I'm having doubt whether this kind of approach will work best in web
atmosphere rather than a windows application or not?
and also loading 40,000 records in a collection base object will give better
performance or not?

Please kindly suggest me, how to proceed in the terms of which is better way
to deal with this.

Thanks in Advance
Vadivel KumarI would put this way- if you are going to pull all 40K records in the
collection class and your web site will have multiple visitors (that means
multiple instances of the same class would be urnning in memory)- you are
definitely experience performance problem. If the business logic permits, I
would only pull the records necessary.

Also, .NET has memeory problem with larger objects (40K records is
definitely one of that kind). You are on the right track to analyse the
problem but you may have to compromise some performance to keep the business
logics flowing.

Prodip

"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
better
> performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
way
> to deal with this.
> Thanks in Advance
> Vadivel Kumar

On Tue, 15 Feb 2005 08:46:01 -0600, "Prodip Saha" <psaha@.bear.com>
wrote:

>Also, .NET has memeory problem with larger objects (40K records is
>definitely one of that kind). You are on the right track to analyse the
>problem but you may have to compromise some performance to keep the business
>logics flowing.

40k records would be a large collection of many small objects - which
can cause problems too.

--
Scott
http://www.OdeToCode.com/blogs/scott/
For example, my data layer contains a class called "product" which inherits
IEnumerator interface and this
class is used by business layer class "products" in which
i have written all my business logic etc.,

So, while retriving the any number of product i'm iterating
from product class in products class.

Is this makes sense and I'm following the standards? and If i follow the
standards i have to give up the price of performance. So, is this shows the
standards are not right?

I'm literrally confused. Advice me.

Thanks & Regards
Vadivel Kumar

"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
> better performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
> way to deal with this.
> Thanks in Advance
> Vadivel Kumar
And, I would like to know another one stuff like I'm developing a set of
libraries
which can be used with windows or web based interface my library code will
execute based on which kind
of interface it is deployed.

So, how to check this in C#, if you take C i normally use
preprocessor directive to check which platform, which architecture etc.,
based on that i will define my functions.

Kindly help me on this.

Thanks in Advance
Vadivel Kumar

"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
> better performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
> way to deal with this.
> Thanks in Advance
> Vadivel Kumar

Performance of CollectionBase class

Hi Guys,
I have a doubt which is little bit conceptual rather than a coding
convention.
I have a a table called products in which I have 40000 and odd products
which is expected to be frequently
accessed by the website. I'm having doubt in how fast i can serve this
product details to the requesting clients.
Basically, I have created necessary stored procedures to pull out the data
from the database. Now, I'm planning to have
a data access layer called product (a class) which contains properties,
enumerators etc., to load all the product details
by executing the stored procedure. That is, the data access layer will be
used by the business layer to deal with the product
details in the means of populating it in the webpage, filtering etc.,
So, the product class inherits Collectionbase class to have all the
enumerator, indexer funtionalities which is nothing
but a custom data source and which can be used with DataGrid etc., and all
the business logic like how to populate, what
to populate has been written in the business layer (it uses the data layer
to define the bl), which is eventually used by
the web developers to design the dynamic pages of the site.
I'm having doubt whether this kind of approach will work best in web
atmosphere rather than a windows application or not?
and also loading 40,000 records in a collection base object will give better
performance or not?
Please kindly suggest me, how to proceed in the terms of which is better way
to deal with this.
Thanks in Advance
Vadivel KumarI would put this way- if you are going to pull all 40K records in the
collection class and your web site will have multiple visitors (that means
multiple instances of the same class would be urnning in memory)- you are
definitely experience performance problem. If the business logic permits, I
would only pull the records necessary.
Also, .NET has memeory problem with larger objects (40K records is
definitely one of that kind). You are on the right track to analyse the
problem but you may have to compromise some performance to keep the business
logics flowing.
Prodip
"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
better
> performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
way
> to deal with this.
> Thanks in Advance
> Vadivel Kumar
>

On Tue, 15 Feb 2005 08:46:01 -0600, "Prodip Saha" <psaha@.bear.com>
wrote:

>Also, .NET has memeory problem with larger objects (40K records is
>definitely one of that kind). You are on the right track to analyse the
>problem but you may have to compromise some performance to keep the busines
s
>logics flowing.
>
40k records would be a large collection of many small objects - which
can cause problems too.
Scott
http://www.OdeToCode.com/blogs/scott/
For example, my data layer contains a class called "product" which inherits
IEnumerator interface and this
class is used by business layer class "products" in which
i have written all my business logic etc.,
So, while retriving the any number of product i'm iterating
from product class in products class.
Is this makes sense and I'm following the standards? and If i follow the
standards i have to give up the price of performance. So, is this shows the
standards are not right?
I'm literrally . Advice me.
Thanks & Regards
Vadivel Kumar
"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
> better performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
> way to deal with this.
> Thanks in Advance
> Vadivel Kumar
>
And, I would like to know another one stuff like I'm developing a set of
libraries
which can be used with windows or web based interface my library code will
execute based on which kind
of interface it is deployed.
So, how to check this in C#, if you take C i normally use
preprocessor directive to check which platform, which architecture etc.,
based on that i will define my functions.
Kindly help me on this.
Thanks in Advance
Vadivel Kumar
"Vadivel Kumar" <donotreply@.spam-i-love-u.com> wrote in message
news:uBxbJK2EFHA.2700@.TK2MSFTNGP14.phx.gbl...
> Hi Guys,
> I have a doubt which is little bit conceptual rather than a coding
> convention.
> I have a a table called products in which I have 40000 and odd products
> which is expected to be frequently
> accessed by the website. I'm having doubt in how fast i can serve this
> product details to the requesting clients.
> Basically, I have created necessary stored procedures to pull out the data
> from the database. Now, I'm planning to have
> a data access layer called product (a class) which contains properties,
> enumerators etc., to load all the product details
> by executing the stored procedure. That is, the data access layer will be
> used by the business layer to deal with the product
> details in the means of populating it in the webpage, filtering etc.,
> So, the product class inherits Collectionbase class to have all the
> enumerator, indexer funtionalities which is nothing
> but a custom data source and which can be used with DataGrid etc., and all
> the business logic like how to populate, what
> to populate has been written in the business layer (it uses the data layer
> to define the bl), which is eventually used by
> the web developers to design the dynamic pages of the site.
> I'm having doubt whether this kind of approach will work best in web
> atmosphere rather than a windows application or not?
> and also loading 40,000 records in a collection base object will give
> better performance or not?
> Please kindly suggest me, how to proceed in the terms of which is better
> way to deal with this.
> Thanks in Advance
> Vadivel Kumar
>

Monday, March 26, 2012

Performing issues

Hi guys,
What is faster to IIS, a Code Behind file or a In Code aspx file?
When we call for a Class like dim f as new MyClass if it's a big class,
will it take longer to run? or the IIS only access the funcions that we call
inside the class when we call it?
Thanks
Bruno Alexandre
Kbenhavn, Danmark
"a portuguese in Denmark"An ASPX file is parsed at run-time to MSIL, which is then compiled to a
native image. A DLL is MSIL, so it takes fewer operations to compile it to a
native image. Of course, caching mechanisms make most of that moot, as the
resources are no continually being re-compiled.
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.
"Bruno Alexandre" <bruno.in.dk@.gmail.com> wrote in message
news:uL60f$E6GHA.3508@.TK2MSFTNGP06.phx.gbl...
> Hi guys,
> What is faster to IIS, a Code Behind file or a In Code aspx file?
> When we call for a Class like dim f as new MyClass if it's a big class,
> will it take longer to run? or the IIS only access the funcions that we
> call inside the class when we call it?
> Thanks
> --
> Bruno Alexandre
> Kbenhavn, Danmark
> "a portuguese in Denmark"
>
>
Hi Kevin,
but I'm not talking about DLL, only VB files (classes) and having the code
in the same page or separete one.
I dont thing that the IIS will take my hole site and put it in diferent
DLL's (there is an option in framework 2.0 that we can do that into one DLL)
but this is not my point.
Bruno Alexandre
Kbenhavn, Danmark
"a portuguese in Denmark"
"Kevin Spencer" <uce@.ftc.gov> escreveu na mensagem
news:uhr08DH6GHA.3508@.TK2MSFTNGP06.phx.gbl...
> An ASPX file is parsed at run-time to MSIL, which is then compiled to a
> native image. A DLL is MSIL, so it takes fewer operations to compile it to
> a native image. Of course, caching mechanisms make most of that moot, as
> the resources are no continually being re-compiled.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> Software Composer
> http://unclechutney.blogspot.com
> If the Truth hurts, wear it.
> "Bruno Alexandre" <bruno.in.dk@.gmail.com> wrote in message
> news:uL60f$E6GHA.3508@.TK2MSFTNGP06.phx.gbl...
>

Performing issues

Hi guys,

What is faster to IIS, a Code Behind file or a In Code aspx file?

When we call for a Class like dim f as new MyClass if it's a big class,
will it take longer to run? or the IIS only access the funcions that we call
inside the class when we call it?

Thanks

--

Bruno Alexandre
Kbenhavn, Danmark

"a portuguese in Denmark"An ASPX file is parsed at run-time to MSIL, which is then compiled to a
native image. A DLL is MSIL, so it takes fewer operations to compile it to a
native image. Of course, caching mechanisms make most of that moot, as the
resources are no continually being re-compiled.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
If the Truth hurts, wear it.

"Bruno Alexandre" <bruno.in.dk@.gmail.comwrote in message
news:uL60f$E6GHA.3508@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

Hi guys,
>
What is faster to IIS, a Code Behind file or a In Code aspx file?
>
When we call for a Class like dim f as new MyClass if it's a big class,
will it take longer to run? or the IIS only access the funcions that we
call inside the class when we call it?
>
Thanks
>
--
>
Bruno Alexandre
Kbenhavn, Danmark
>
"a portuguese in Denmark"
>
>
>
>


Hi Kevin,

but I'm not talking about DLL, only VB files (classes) and having the code
in the same page or separete one.
I dont thing that the IIS will take my hole site and put it in diferent
DLL's (there is an option in framework 2.0 that we can do that into one DLL)
but this is not my point.

--

Bruno Alexandre
Kbenhavn, Danmark

"a portuguese in Denmark"

"Kevin Spencer" <uce@.ftc.govescreveu na mensagem
news:uhr08DH6GHA.3508@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

An ASPX file is parsed at run-time to MSIL, which is then compiled to a
native image. A DLL is MSIL, so it takes fewer operations to compile it to
a native image. Of course, caching mechanisms make most of that moot, as
the resources are no continually being re-compiled.
>
--
HTH,
>
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
>
If the Truth hurts, wear it.
>
"Bruno Alexandre" <bruno.in.dk@.gmail.comwrote in message
news:uL60f$E6GHA.3508@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>Hi guys,
>>
>What is faster to IIS, a Code Behind file or a In Code aspx file?
>>
>When we call for a Class like dim f as new MyClass if it's a big class,
>will it take longer to run? or the IIS only access the funcions that we
>call inside the class when we call it?
>>
>Thanks
>>
>--
>>
>Bruno Alexandre
>Kbenhavn, Danmark
>>
>"a portuguese in Denmark"
>>
>>
>>
>>


>
>

Permission

Hey Guys...
I've created my SmartClient that have to print some text directly to the
printer. To do it, I create a text file and after copy it to the printer.
Perfect... But, I am having some permission problems... Look the error:
The application tried to execute a not permited operation by the security
directive ...
System.Drawing.PrintingPermission, System.Drawing.Version=...
Could someone help me?
Thank'sHi,
I think i already send you chris sells article. you can find your
solution there :
http://msdn.microsoft.com/library/d...y/en-us/dnforms
/html/winforms11122002.asp
and
http://msdn.microsoft.com/msdnmag/i...etSmartClients/
HTH
Natty Gur[MVP]
blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Permission

Hey Guys...

I've created my SmartClient that have to print some text directly to the
printer. To do it, I create a text file and after copy it to the printer.
Perfect... But, I am having some permission problems... Look the error:

The application tried to execute a not permited operation by the security
directive ...

System.Drawing.PrintingPermission, System.Drawing.Version=...

Could someone help me?

Thank'sHi,

I think i already send you chris sells article. you can find your
solution there :

http://msdn.microsoft.com/library/d...y/en-us/dnforms
/html/winforms11122002.asp

and

http://msdn.microsoft.com/msdnmag/i...etSmartClients/

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Friday, March 16, 2012

Persistent nonsecure content message when loading a file into an IFRAME element

Guys and gals,

I am having a problem with an IFRAME that is embedded into an ASPX
page (ASP.NET application). The IFRAME is originally empty (src='').
When a user selects a date from the drop-down list box above the
IFRAME, the IFRAME loads the content of a file on the local machine
(c:\bds\blahblahblah.txt).

The application that contains this page is running on a secure socket
layer (SSL). When the IFRAME tries to load the file, a message pops up
stating that "The page you are about to view contains both secure and
nonsecure content. Would you like to view the nonsecure content?".

I desperately need to get rid of this message. I have tried every
trick in the book, and so far, no dice. Here's what I have tried:

1. Setting security setting for Intranet to Low.
2. Adding the machine itself to its own list of trusted sites. Setting
trusted site security to Low.
3. Enabling everything in the security contents.
4. Enabling 'Display Mixed Contents'. Then disabling it. Then setting
it to Prompt. None of this made any difference.
5. Setting the src attribute of the IFRAME to blank (''). Setting it
to blank.html. Setting it to javascript:parent.nullSrc();, where
nullSrc() function in the parent page returns ''.
6. Setting application trust to full trust.
7. Installing every patch available. We are running IE 6 with SP1.
8. Sharing the folder containing the files I am trying to load. Web
sharing the same folder.

I can't think of other stuff, but I am sure I tried more than that. I
really hope you can help me with this, I am kinda running our of
creative ideas on resolving this problem.

Many thanks for your attention,
Helen.in IE under

Internetnet Options->Advanced->Security
uncheck "Warn if changing between secure and unsecure mode"

"Helen" <emailhelen@.comcast.net> wrote in message
news:516ce28b.0310151301.db4ff88@.posting.google.co m...
> Guys and gals,
> I am having a problem with an IFRAME that is embedded into an ASPX
> page (ASP.NET application). The IFRAME is originally empty (src='').
> When a user selects a date from the drop-down list box above the
> IFRAME, the IFRAME loads the content of a file on the local machine
> (c:\bds\blahblahblah.txt).
> The application that contains this page is running on a secure socket
> layer (SSL). When the IFRAME tries to load the file, a message pops up
> stating that "The page you are about to view contains both secure and
> nonsecure content. Would you like to view the nonsecure content?".
> I desperately need to get rid of this message. I have tried every
> trick in the book, and so far, no dice. Here's what I have tried:
> 1. Setting security setting for Intranet to Low.
> 2. Adding the machine itself to its own list of trusted sites. Setting
> trusted site security to Low.
> 3. Enabling everything in the security contents.
> 4. Enabling 'Display Mixed Contents'. Then disabling it. Then setting
> it to Prompt. None of this made any difference.
> 5. Setting the src attribute of the IFRAME to blank (''). Setting it
> to blank.html. Setting it to javascript:parent.nullSrc();, where
> nullSrc() function in the parent page returns ''.
> 6. Setting application trust to full trust.
> 7. Installing every patch available. We are running IE 6 with SP1.
> 8. Sharing the folder containing the files I am trying to load. Web
> sharing the same folder.
> I can't think of other stuff, but I am sure I tried more than that. I
> really hope you can help me with this, I am kinda running our of
> creative ideas on resolving this problem.
> Many thanks for your attention,
> Helen.
Bruce:

Thanks for your reply. I tried that, and it had no effect, before and
after I rebooted.

Helen.