Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Slow Access To Module Loader

  1. #1
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Slow Access To Module Loader

    I am running SugarCRM 4.5.1a.

    Is there a reason it takes a very long time to enter the the Module Loader? I have been upgrading since 3.51. It takes about 5 minutes to enter. When I installed a new copy of SugarCRM 4.5.1 entry was almost immediate.

    Any ideas what would slow this process down?

    Thanks,
    John Novak

  2. #2
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: Slow Access To Module Loader

    Module Loader inspects all of files under cache/upload/upgrades directory before it starts its task. Your cache directory may have lots of (unnecessary) files that makes Module Loader slow.

    Check that directory in your server and delete unnecessary files. You may want to delete at least temp files in upload/upgrades/temp, that will simply improves performance.
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  3. #3
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Re: Slow Access To Module Loader

    Quote Originally Posted by ruchida
    Module Loader inspects all of files under cache/upload/upgrades directory before it starts its task. Your cache directory may have lots of (unnecessary) files that makes Module Loader slow.

    Check that directory in your server and delete unnecessary files. You may want to delete at least temp files in upload/upgrades/temp, that will simply improves performance.
    How do you determine which files are necessary in cache/upload/upgrades? There are no files in cache/upload/upgrades/temp.

    Does this have anything to do with the following error that I get once I get into Module Loader:

    Error: PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file 'cache/upload/upgrades/module/tabpanels11b-351a.zip'



    Thanks,
    John Novak
    Last edited by jnovak; 2007-03-04 at 02:51 PM.

  4. #4
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: Slow Access To Module Loader

    Since you're using 4.5.1, SugarCRM is going to connect to SugarExchange when Modules Loader is selected. This happens even when you're going to load a module locally. This is a little bit bad design of SugarCRM.
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  5. #5
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Re: Slow Access To Module Loader

    OK, but how do you determine which files & folders to delete? Also, what is causing the error I am gitting?

    Thanks
    John Novak

  6. #6
    majed's Avatar
    majed is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    198

    Default Re: Slow Access To Module Loader

    4.5.1 b should include a patch for the issue of the module loader loading slowly once you have loaded several modules. After the points ruchida made we will be doing a full review on the module loader process. I do not believe the auto-connect feature is causing the slow down, but it will be reviewed. Our intention was simply to make it as easy as possible for people to get new modules and upgrades from within the application hence the auto sign-in feature. I will post the code for this fix later today so you guys can give it a whirl and let us know if it fixes the slowdown issue. We use the module loader all the time internally so we know the pains, and thank you for the feedback we always have our eyes peeled to these forums for ways to make the product better.

    Also the PCL_ZIP error sounds as though the zip file is missing can you check to make sure cache/upload/upgrades/module/tabpanels11b-351a.zip is there and if so. Pull it down from the server and make sure it is a good zip file. Just unzip it with winzip or unzip and if it unzips then there is another issue, but keep us posted so we can get this resolved.

    Expect the code by the end of our workday monday.

    Thanks,
    Majed
    Majed Itani
    Software Engineer
    SugarCRM Inc.

  7. #7
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Re: Slow Access To Module Loader

    Quote Originally Posted by majed
    4.5.1 b should include a patch for the issue of the module loader loading slowly once you have loaded several modules. After the points ruchida made we will be doing a full review on the module loader process. I do not believe the auto-connect feature is causing the slow down, but it will be reviewed. Our intention was simply to make it as easy as possible for people to get new modules and upgrades from within the application hence the auto sign-in feature. I will post the code for this fix later today so you guys can give it a whirl and let us know if it fixes the slowdown issue. We use the module loader all the time internally so we know the pains, and thank you for the feedback we always have our eyes peeled to these forums for ways to make the product better.

    Also the PCL_ZIP error sounds as though the zip file is missing can you check to make sure cache/upload/upgrades/module/tabpanels11b-351a.zip is there and if so. Pull it down from the server and make sure it is a good zip file. Just unzip it with winzip or unzip and if it unzips then there is another issue, but keep us posted so we can get this resolved.

    Expect the code by the end of our workday monday.

    Thanks,
    Majed
    If this module is not really loaded, is there a way of removing the message? Is there a way to fix the problem so that SugarCRM does not think it is loaded?

    Thanks,
    John Novak

  8. #8
    majed's Avatar
    majed is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    198

    Post Re: Slow Access To Module Loader

    As promised here are the code changes that need to be made


    in a file located at include/dir_inc.php

    change the function findAllFiles to this

    Code:
    function findAllFiles( $the_dir, $the_array, $include_dirs=false, $ext=''){
        $d = dir($the_dir);
        while( $f = $d->read() ) {
            if( $f == "." || $f == ".." ){
                continue;
            }
    
            if( is_dir( "$the_dir/$f" ) ) {
    			if($include_dirs) {
    				$the_array[] = clean_path("$the_dir/$f");
    			}
                $the_array = findAllFiles( "$the_dir/$f/", $the_array, $include_dirs , $ext );
            } else {
    			if(empty($ext) || strrpos("$f", $ext) == strlen("$f") - strlen($ext)){
    				$the_array[] = clean_path("$the_dir/$f");
    			}
            }
    
    
        }
        rsort($the_array);
        
        return $the_array;
    }
    This will allow you to filter the files that are being browsed and we are going to use this filter in the file

    modules/UpgradeWizard/uw_utils.php. Around line 283 there is a function called getValidPatchName in there change
    Code:
    $upgrade_contents = findAllFiles($base_upgrade_dir, array(), false);
    To
    Code:
    $upgrade_contents = findAllFiles($base_upgrade_dir, array(), false, 'zip');
    This should boost your performance if not let me know. The patch is checked in, but it was checked in a while ago so i may be missing 1 more change that needs to occur.

    As for deleting the zip you should be able to just remove it from the directory. You also will need to delete the manifest.php file.

    Thanks,
    Majed
    Majed Itani
    Software Engineer
    SugarCRM Inc.

  9. #9
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Re: Slow Access To Module Loader

    The directory "cache\upload\upgrades\module" did not have anything in it and thats what was giving me the error. When I put the .zip in this directory, the error message disappeared. There is no manifest file in the directory. When I remove the .zip file the error returns. With the .zip file in the directory, the module loader shows the module as being installed. Since this module is not installed, how do I delete the .zip and tell SugarCRM that the module is not loaded?

    At one time, many versions ago, I tried to load this module but it is no longer loaded. SugarCRM is still looking for it. Where is the reference that SugarCRM is using such that it thinks it is loaded?

    Thanks,
    John Novak

  10. #10
    jnovak is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    109

    Default Re: Slow Access To Module Loader

    I tried uninstalling the module from the list in module loader and got the following message:


    Warning: PackageManager::getPackagesInStaging(cache/upload/upgrades/module/whosonline10c-351-manifest.php) [function.getPackagesInStaging]: failed to open stream: No such file or directory in /var/www/html/sugarcrm/ModuleInstall/PackageManager/PackageManager.php on line 597

    Fatal error: PackageManager::getPackagesInStaging() [function.require]: Failed opening required 'cache/upload/upgrades/module/whosonline10c-351-manifest.php' (include_path='.:/usr/share/pear') in /var/www/html/sugarcrm/ModuleInstall/PackageManager/PackageManager.php on line 597

    Any idea what this means?

    Thanks,
    John Novak

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Module Builder
    By Olavo in forum Downloads
    Replies: 418
    Last Post: 2009-02-26, 06:36 AM
  2. Replies: 3
    Last Post: 2006-11-10, 10:10 AM
  3. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  4. Module Loader Limitations
    By ftreml in forum Developer Help
    Replies: 1
    Last Post: 2005-10-28, 11:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •