I just checked in some more changes. And I think this is the last of the
easy hits I can do. What I've done is add a per-request cache. You use it
like this [1], although I've already added it in the one place where it
makes the most sense (default.aspx/DoPage). I added the code so that the
authorization provider takes advantage of the request cache to cache rule
lookups. Obviously, we can't cache rule lookups across requests, since they
could come in on different security contexts, but caching them in a single
request should be pretty safe. And it does make a difference. For
DarrenSQLIS, the canonical slow page from my  previous round of tests, the
stats now look like this: 

 

Render from empty topic and request caches: 32.1 s

Render from populated topic cache w/o RequestContext: 1.8 s

Render from populated topic cache and empty request cache: 1.3s

Render from populated topic cache w/ populated request cache: 1.2s

 

A tenth of a second might not seem like much, but it is about 8% faster, and
it's overall 30% faster than without RequestContext at all. And something
like a few dozen times faster than a few weeks ago. So I'm not too unhappy. 

 

Going beyond this is going to take a fair amount of work. I think I've hit
all the really obvious slow spots, and the performance is really starting to
smear out - a little bit here, a little bit there. The big cost on a page is
WikiTalk, and changing that is going to be a moderately big deal. I'm hoping
we don't need to go there. I'm going to rerun my overall FlexWiki tests
tonight on the latest code to see where we stand on performance versus 1.8.
I'm guessing that we're overall slightly faster, and that the number of
pages that are a lot slower is way lower now, but who knows: maybe the
stupid thing will blow up or be even slower. 

 

[1] 

 

using (RequestContext.Create())

{

  // You can cache things in it like this: 

  RequestContext.Current["foo"] = SomeObject(); 

}

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users

Reply via email to