cancel
Showing results for 
Search instead for 
Did you mean: 

ADVISOR - how to pre-generate a page

Solved
MEGA

ADVISOR - how to pre-generate a page

Hello everyone,

 

it seems to possible to generate a page (index or a page with data objects) beforehand (hided) to make the displaying faster....

Could you tell me, how to do this?

 

Thanks

 

7 Replies
MEGA

Re: ADVISOR - how to pre-generate a page

Hello Fabien,

 

In MEGA 2009 SP5 the Lab developed a new way to improve performances of Advisor with the Preload feature.

The official communication around this feature will happen with the delivery of the Release 7 in July, but you can use it with MEGA 2009 SP5 CP6

 

What is the preload feature ?

 

At the first Advisor connection, four processes (Windows processes) are launched on the Web Server.

The processes open the MEGA Repository, load the MetaModel definitions, load the profile preferences, load the Web template definitions, etc.

These steps are very complex and generate a lot of request to the database, it is the reason why they are relatively time expensive

After 20 minutes of idle time (without requests) the processes are stopped by IIS and when the next user arrive, he have to wait the same launch time than the first one.

 

The preload feature is an Advisor configuration which give you the ability to schedule the first loading and maintain it active all the day. The document attached in this post explain how to implement it.

 

How it can help you to generate specific page ?

 

Your question concerning the pre-generation of Advisor pages could be addressed if you add the list of the pages to be generated in the PreLoadProfil function of the preload.cs file in the App_Code folder of Advisor.

 

In the example below, the pages of the diagrams declared in the sDiagramArray are generated at the preload of each profile

 

public class preload
{
  static public bool PreLoad(MEGAWebAccessLib.MegaWebAccessServerClass pMWA , settings pSettings , int nLevel, bool bDiscarding)
  {
    bool bPreloading = true;
 
    //string[] sDiagramArray = new string[6];
    //----
    //sDiagramArray[0] = "6AF97897469B00D5"; // "A186A2574F336478";
    //sDiagramArray[1] = "6B62C29742356904"; // "A186A26C4F336667";
    //sDiagramArray[2] = "8DFE8E7945120005"; // "A186A20E4F336292";
    //sDiagramArray[3] = "6D6ADF6940C545B8"; // "A186A69D4F336E4B";
    //sDiagramArray[4] = "4CE46666448D016A"; // "A186A6134F336A78";
    //sDiagramArray[5] = "DE855E0B48C12B71"; // "A186A63F4F336C8F";
    if (bDiscarding && (nLevel == 1))
    {
      //pMWA.Discard(1, "C:\Users\Public\Documents\MEGA 2009 SP4\Demonstration");
    }
 
    switch (nLevel)
    {
      case 1:
        //PreLoadProfil(pMWA, pSettings, pSettings.settings_language_Italiano, "Guest", "", "C:\\Users\\Public\\Documents\\MEGA 2009 SP4\\Demonstration", "Adventure", sDiagramArray);
        break;
      case 2:
        //PreLoadProfil(pMWA, pSettings, pSettings.settings_language_Italiano, "Guest", "", "C:\\Users\\Public\\Documents\\MEGA 2009 SP4\\Demonstration", "Adventure",sDiagramArray);
        break;
      default:
        bPreloading = false;
        break;
    }
 
    return bPreloading;
  }

 

 

 

 

 

MEGA

Re: ADVISOR - how to generate a page

Hello Christophe,

 

 

 

To clarify some points, I have somes questions :

 

* The preload Method is a method that allow us to put in the cache the page we want ?

 

* What does "discarding environment" mean ? How the variable "bDiscarding" can be changed and transmitted to the Preload Method ?

 

* Will this solution have an impact on Workflow RFC ? (I don't thonk so)

 

Thank you for you help and your time,

 

 

Best regards,

 

--

Fabien

MEGA

Re: ADVISOR - how to generate a page

Hello Fabien,

 

  1. The Preload method is a way to dramatically improve the connection times on Advisor. In the same time you can also generate (or put pages on the cache) the pages you want. Schedule the Preload before the beginning of the working hours (6 O'clock for example) 
  2. With the bDiscarding parameter you can unload Advisor before restarting it (it is a way to cleanup the daily consumed memory of the MGWSPRO process)
  3. The Preload feature have no impact on RFC
MEGA

Re: ADVISOR - how to generate a page

Christophe,

 

Thank you for your answer.

 

 

You forgot to tell me how can I put bDiscarding to true or false ? And where can I do that ? Smiley Wink May be in the URL : "http://localhoast/admin/admintration_page.aspx?preload=1 " but I'am not sure...

 

 

Thank you again.

 

Bye

 

MEGA

Re: ADVISOR - how to generate a page

Hello Fabien,

 

You're right Smiley Happy, but the answer is in the document attached to my first reply (page 11)

 

  1. Configure the action
    1. Choose “start a program”
    2. Select the program mwsr.exe
    3. On the argument field set URL of the administration page with preload parameter set to 1, for instance  :

 

 "http://localhost/Advisor/admin/Administrator_Page.aspx?preload=1"

 

Regards

MEGA

Re: ADVISOR - how to generate a page

Hello Christophe,

 

 

I have a question concerning the document you gave me.

 

Where can I find the program "mwsr.exe" when creating a task ?

 

Thank you very much

 

Fabien

MEGA

Re: ADVISOR - how to pre-generate a page