Support Forums

 
  iFinity Support Forum  DotNetNuke Modu...  Friendly Url Pr...  Input string not in correct format
Previous Previous
 
Next Next
New Post 9/11/2008 11:17 AM
  Bruce Chapman
569 posts
1st Level Poster


Re: Input string not in correct format 

Rick I don't have the code for the latest version ready to be posted yet, it needs to be packaged up properly.  However, I can tell you that the size of the page cache is worked out like this (the page cache is a dictionary<string,string> object, with the first string the alias/pagename, and the second string the rewrite value, ie default.aspx?tabid=34):

sum across portals( portalAlias x tabs). 

So if you have 200 portals and 76774 tabs, and each portal has 2 portal aliases, you're looking at a dictionary size of (76774 x 2) = 153548 entries.  The average entry size for the dictionary is probably 45 bytes, so right there you're looking at 7 Mb as a best case scenario.  In reality it's probably 10-20% bigger than that.  And as you have noted, the process of building the cache for the number of pages you're looking at requires some decent working memory.

I do have future plans to cut down the dictionary size by both only building the dictionary for portals as they are requested, rather than all portals as you have noted.  I also plan to only keep a copy of the page for a single portal alias, instead of duplicating across portal aliases.  This will mean choosing a single,canonical portal alias, but this is good practice anyway.  These changes will ultimately mean that the page index will be reduced by at least 50%, and, if built portal-at-atime, reduce the startup.  These factors don't show up for single portal installs, but one like you're talking about is showing up these issues.  The reason I haven't done this yet is that to do it properly it requires some refactoring of the code so that it deals with portals individually rather than altogether as is currenlty the case.  It's designed like this as I originally wrote the provider with a single website in mind, and the scope of the project has grown somewhat since then, but those fundamental design choices are still showing through.

So I think my best advice I can give is that the module might not be suitable for that size install just yet.  But I'm happy to work with you in improving performance by concentrating on these aspects.  Unfortunately I can't just drop everything and fix these things because of my workload, but over time I will endeavour to address things.

-Bruce

 
New Post 9/12/2008 1:56 AM
  Rick Hein
12 posts
10th Level Poster


Re: Input string not in correct format 

Thank Bruce,

I ended up firing up Reflector against the assembly and taking a look under the hood. Yes, I can see where you will need to refactor the code in the TabDictController class (mostly). And you are entirely correct about building the dictionary at the time the first page for particular portal is requested - it 's will cause a slight delay in the first request for a portal, but it should be tolerable. I also understand your comment about not wanting to store more than one portal alias, however I think you could still support multiple alias's AND only have one copy of the rewrite value in memory. What I would suggest is that you build a composite object combining the dictionary with a datastructure (array, arrayList, ????) that contains the list of portal alias that go with that set of tabs. Store those composite objects in a List that ineherits from the generic list object and then you can do searches against that List using the domain name you have from the request... Heck you could even probably make the search also take a portal id so when a request comes in the first search would be by portal alias, and if that fails then do a search by portal id - it THAT works, then you can put the portal alias into the data structure that holds the portal alias's and you'd be off the races - you would already have all the tab id's done. In the last  choice if the portal id wasn't found then you build a new composite object and slap that into the list.

I honestly don't think it's the memory footprint of the dictionary itself causing the problems I believe it's more the overhead of the GetAllTabs() call, the size of the returned recordset and the overhead of processing it. The core system had (until yesterday when I reported it) a similar issue - on start up it was trying to build the cache for all portals and for all tabs - and it was getting all the tabs for all the portals for every portal as it was trying to setup the TabPathDictionary, instead of restricting it to just the portal it was working on at the time - here's a link to the bug report (if you care) support.dotnetnuke.com/issue/ViewIssue.aspx

The ONE thing you could do for me that would be VERY helpful would be to PLEASE package the source code - once I get it running on my dev box I'm fairly certain I can get the changes I need in there and working. We've got a client breathing down our neck about this and I'd be happy to share my results with you.

Thanks.

Rick

 
New Post 9/12/2008 8:27 AM
  Bruce Chapman
569 posts
1st Level Poster


Re: Input string not in correct format 

Rick

I'll endeavour to get some source code to you as soon as I can.   You can certainly experiment with it and attempt to restrict to one portal load at a time.  My plan is actually to flip the order around somewhat and identify the portal first (based on a regex - sourced routine I've already written) and then go on to identify the tab etc if required.  The reason for this is to (1) only load the tabs for that portal and (2) allow all types of domain-based redirects before going through the processing of finding hte matching tab.  The current system (as is ) tries to identify the alias/tab as a pair, and then works out if that was the correct alias or not.  It's kind of around the wrong way.

With regards to your suggestions - the first thing you'll find is that identifying a portal based on a domain name is a very tricky thing indeed.  Portal aliases are strange beasts - some are just domain names, some are domain names with virtual directories.  Others are domain names with child aliases tacked on the end.  Some have port numbers, some do not.  It's never just as simple as finding something to the left of the first '/' like it would appear at first glance.  Trust me I've been down that difficult road!

-Bruce

 
New Post 9/16/2008 8:47 AM
  Rick Hein
12 posts
10th Level Poster


Re: Input string not in correct format 

Bruce, I realize your busy, but any word on the source code? My boss is breathing down my neck about this. Thanks.

Rick

 

 
New Post 9/16/2008 2:19 PM
  Bruce Chapman
569 posts
1st Level Poster


Re: Input string not in correct format 

Hi Rick

I've posted the source code at http://www.ifinity.com.au/Products/Friendly_Url_Provider_For_DNN/

I'll make no warranty as to whether it will compile out of the box though, because I haven't had time to verify that it is complete and correct.

-Bruce

 
Previous Previous
 
Next Next
  iFinity Support Forum  DotNetNuke Modu...  Friendly Url Pr...  Input string not in correct format
Can't find the answer?
 

If you can't find the answer and don't have time...try out the Premium Support service.  Get personal attention and get the problem fixed by an expert.

 

Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.

If you wish, you can use the Premium Support Service for one-on-one support.