Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListUDT performance / load times issueUDT performance / load times issue
Previous
 
Next
New Post
8/17/2011 2:54 AM
 
I make extensive use of Form and List modules but have hit a real performance issue - around 90 seconds to load a page - with a list of only 1000 rows. (There are under 20,000 entries in the user defined data table). Each row in this particular list corresponds to attendence at an event by a family, and contains links to each family member and to some qualifications from their User Profile.

So, most of the columns look-up Users or get elements from UserProfiles. This is understandably slow (with the current database structure - I have some longer term ideas for improvements based on replacing the ntext value field with indexed lookups).

On our site, there are hundreds of filtered views of this module, where each view filters to a single event and typically might return just 10 rows, corresponding to 10 families.

I understand that the UDT module builds a complete dataset in memory in order to support searching, sorting, etc. I am looking for a way, behind the scenes, to populate the dataset with just the rows I want, and am happy that searching and sorting will only be on these rows.

I strongly suspect that if the SQL Server stored procedures for the UDT module included TabModuleID as a parameter instead of, or in addition to, ModuleID, I could change the stored procedures to just return the rows I want for each view of the module. This is because the TabModuleID is the key to the TabModuleSettings as well as linking to the ModuleID. I can pretty easily modify the SQL to suit given the TabModuleID as a parameter.

Does this make sense, and if so what are the options for requesting a change to the module, or getting my hands dirty with VB code changes? I am not sure yet where to find the code that invokes the SQL stored procedures to build the dataset.

Thanks, Richard
 
New Post
8/17/2011 7:01 AM
 
Richard, I am not surprised at all.

1000 and more records with an extensive usage of  DataTypes which trigger API/DB calls per cell must result in slow performance.
Form and List is not designed for your use case, and I don't think that a change request will help.

The TabModuleId is a special use case. In your case, you did add a field "TabModuleId" to the table definition. From FnL perspective, this is just an ordinary Int field.
---
The entry point for data is the function getDataset whithin UserDefinedTableController



 
New Post
8/17/2011 11:14 AM
 
Hi Stefan and thanks for your very quick reply.

Not sure I understand what you mean by "you did add a field ... to the table definition". I have not changed any definitions, and a simple look up on the TabModule table can find ModuleID given TabModuleID and vice versa.

The suggestion to replace ModuleID with TabModuleID in the stored procedure calls is not really a special use case, since every invocation of a module is always from a Tab and is therefore associated with a TabModuleID. It would be a very small overhead to get the ModuleID from the TabModule table inside the stored procedure, but would give an enormous benefit to those who want to 'tune' the behaviour at the database level without changing source code. The bottom line for me is that there is no need to read in the entire content of the module when there is a filter, since the filter cannot be changed by the user and all the subsequent sort and search operations only operate on the filtered subset.

For me, it it easier to implement a filter at the database level (and faster).

Next dumb question is where can I find the definition of DataProvider.Instance().GetRows(ModuleID)?

Many thanks, Richard
 
New Post
8/17/2011 8:12 PM
 
Hi Stefan

Just to try to make my suggestion a bit clearer, I am suggesting changing one or two SQL Server stored procedures along the following lines:

CREATE PROCEDURE UserDefinedTable_GetRows @ModuleId int AS
...

would become

CREATE PROCEDURE UserDefinedTable_GetRows @TabModuleId int AS
DECLARE @ModuleId int = (SELECT TOP 1 ModuleId FROM TabModule WHERE TabModuleId = @TabModuleID)
...

The overhead is insignificant compared with retrieving the rest of the data!

No further changes to the standard stored procedures or data structures would be needed, and the only change to the module code would be to substitute tabModuleId for moduleId where the database calls are made.

With this change, the standard stored procedures could be readily modified in local implementations to filter the rows returned, by accessing and applying the relevant TabModuleSettings for the specific TabModule being displayed - now exposed because the TabModuleId is known.

Probably only GetRows and maybe FillDefaultData would need to be changed, unless there are side effects I am unaware of.

Cheers for now, Richard
 
New Post
8/18/2011 7:21 AM
 
Richard, sorry, this change would return the very same amount of data as before.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListUDT performance / load times issueUDT performance / load times issue


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out