I'm dynamically loading an assembly into an ASP.NET application. In the
control that I load from that dynamic assembly I've tried to use
Server.HTMLEncode but this results in a serious performance loss. Is there
anyone who knows why or is there an alternative for server.htmlencode
method? Without the server.htmlencode the thingy works very fine.
greetz
MichaelThe HtmlEncode mathod will work as fast as the length of the string you are
encoding. If the string is short, it will be fast. If the string is long, it
will be slow.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Michael Gaillez" <michael.gaillez@.howest.be> wrote in message
news:uS0Z52fWEHA.3120@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I'm dynamically loading an assembly into an ASP.NET application. In the
> control that I load from that dynamic assembly I've tried to use
> Server.HTMLEncode but this results in a serious performance loss. Is there
> anyone who knows why or is there an alternative for server.htmlencode
> method? Without the server.htmlencode the thingy works very fine.
> greetz
> Michael
Ok that I can understand. But that is not the reason why I'm losing
performance in this application. If I'm doing exactly the same thing without
an dynamic assembly load it works pretty fast. If I use it with assembly
load it works very slow. So in my opinion the length doesn't really matter
in this case. But what I've found meanwhile is the httputility class were
the functionallity resides from. I will try that because then I don't have
to do this: "Page.Server...." . My guess is that this should do the trick
because reflection might not handle page.server very well.
greets
Michael
"Kevin Spencer" <kspencer@.takempis.com> wrote in message
news:uIi7lwgWEHA.716@.TK2MSFTNGP11.phx.gbl...
> The HtmlEncode mathod will work as fast as the length of the string you
are
> encoding. If the string is short, it will be fast. If the string is long,
it
> will be slow.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
> "Michael Gaillez" <michael.gaillez@.howest.be> wrote in message
> news:uS0Z52fWEHA.3120@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I'm dynamically loading an assembly into an ASP.NET application. In the
> > control that I load from that dynamic assembly I've tried to use
> > Server.HTMLEncode but this results in a serious performance loss. Is
there
> > anyone who knows why or is there an alternative for server.htmlencode
> > method? Without the server.htmlencode the thingy works very fine.
> > greetz
> > Michael
The HttpUtility.HtmlEncode method will definitely work faster, as it is
static.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Michael Gaillez" <michael.gaillez@.howest.be> wrote in message
news:ez5bJ9gWEHA.1888@.TK2MSFTNGP11.phx.gbl...
> Ok that I can understand. But that is not the reason why I'm losing
> performance in this application. If I'm doing exactly the same thing
without
> an dynamic assembly load it works pretty fast. If I use it with assembly
> load it works very slow. So in my opinion the length doesn't really matter
> in this case. But what I've found meanwhile is the httputility class were
> the functionallity resides from. I will try that because then I don't have
> to do this: "Page.Server...." . My guess is that this should do the trick
> because reflection might not handle page.server very well.
> greets
> Michael
> "Kevin Spencer" <kspencer@.takempis.com> wrote in message
> news:uIi7lwgWEHA.716@.TK2MSFTNGP11.phx.gbl...
> > The HtmlEncode mathod will work as fast as the length of the string you
> are
> > encoding. If the string is short, it will be fast. If the string is
long,
> it
> > will be slow.
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> > "Michael Gaillez" <michael.gaillez@.howest.be> wrote in message
> > news:uS0Z52fWEHA.3120@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > > > I'm dynamically loading an assembly into an ASP.NET application. In
the
> > > control that I load from that dynamic assembly I've tried to use
> > > Server.HTMLEncode but this results in a serious performance loss. Is
> there
> > > anyone who knows why or is there an alternative for server.htmlencode
> > > method? Without the server.htmlencode the thingy works very fine.
> > > > greetz
> > > > Michael
> >
0 comments:
Post a Comment