Client loading time takes alot longer

Results 1 to 7 of 7
  1. #1
    Cya Groxy101 is offline
    MemberRank
    Apr 2010 Join Date
    419Posts

    Client loading time takes alot longer

    Yesterday I fixed a problem with the map system in my resource. I found out that in my resource.txt the files defineMapComboBoxData.h, propMapComboBoxData.inc, propMapComboBoxData.txt.txt weren't defined.

    Now that I've fixed the problem, my client takes alot longer (about 7~10sec) to load. I double checked if those files were causing the problem. I'm 100% sure they are causing the problem. This because I checked the loading time without those files, and my client works perfect (loading time ~2sec).

    What can be the problem here?


    Thanks.


  2. #2
    Valued Member iNab is offline
    MemberRank
    Jan 2012 Join Date
    BrazilLocation
    102Posts

    Re: Client loading time takes alot longer

    That's not a "problem".
    After you fix the problem with propMapComboBox, your client wasn't loading the necessary images for map system.
    Now, fixed, it takes more time to load everything. My client loading time is about 20/30 sec :(
    But you can improve it

  3. #3
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: Client loading time takes alot longer

    This is normal for an client to load that long.

    @iNab thats long. my client takes up to 3~4 seconds to load.
    The only downside is that if an user press the M-key for the map it freezes for about 0.5sec. after that the problem is gone.

  4. #4
    Cya Groxy101 is offline
    MemberRank
    Apr 2010 Join Date
    419Posts

    Re: Client loading time takes alot longer

    So you make the client load the map images after they press "M"?

    Quote Originally Posted by raventh1984 View Post
    This is normal for an client to load that long.

    @iNab thats long. my client takes up to 3~4 seconds to load.
    The only downside is that if an user press the M-key for the map it freezes for about 0.5sec. after that the problem is gone.

  5. #5
    Valued Member iNab is offline
    MemberRank
    Jan 2012 Join Date
    BrazilLocation
    102Posts

    Re: Client loading time takes alot longer

    Yes.
    Take a look at WndMapEx.cpp
    Code:
    void CWndMapEx::ResetMapInformation( void )
    Spoiler:
    Code:
    void CWndMapEx::ResetMapInformation( void )
    {
    	CWndComboBox* pWndComboBoxMapName = ( CWndComboBox* )GetDlgItem( WIDC_COMBOBOX_MAP_NAME );
    	if( pWndComboBoxMapName == NULL )
    	{
    		return;
    	}
    	DWORD dwSelectedMapNameItemData = pWndComboBoxMapName->GetSelectedItemData();
    	if( dwSelectedMapNameItemData == MCD_NONE )
    	{
    		return;
    	}
    
    	MapComboBoxDataVector* pMapComboBoxDataVector = prj.m_MapInformationManager.GetMapNameVector();
    	for( MapComboBoxDataVector::iterator Iterator = pMapComboBoxDataVector->begin(); Iterator != pMapComboBoxDataVector->end(); ++Iterator )
    	{
    		CMapComboBoxData* pMapComboBoxData = ( CMapComboBoxData* )( *Iterator );
    		if( pMapComboBoxData == NULL )
    		{
    			continue;
    		}
    
    		if( dwSelectedMapNameItemData == pMapComboBoxData->GetID() )
    		{
    			m_dwSelectedMapID = pMapComboBoxData->GetID();
    			m_bySelectedMapLocationID = pMapComboBoxData->GetLocationID();
    			if (m_bySelectedMapLocationID == DUNGEON_KALGAS 
    				|| m_bySelectedMapLocationID == DUNGEON_UPRESIA 
    				|| m_bySelectedMapLocationID == DUNGEON_UPRESIA_1 
    				|| m_bySelectedMapLocationID == DUNGEON_HERNEOS 
    				|| m_bySelectedMapLocationID == DUNGEON_BEHEMOTH 
    				|| m_bySelectedMapLocationID == DUNGEON_RUSTIA_2 
    				|| m_bySelectedMapLocationID == DUNGEON_RUSTIA_1 
    				|| m_bySelectedMapLocationID == DUNGEON_DREADFULCAVE 
    				|| m_bySelectedMapLocationID == DUNGEON_OMINOUS01 
    				|| m_bySelectedMapLocationID == DUNGEON_SANPRES 
    				|| m_bySelectedMapLocationID == DUNGEON_SANPRES_1 
    				|| m_bySelectedMapLocationID == DUNGEON_MASDUNGEON 
    				|| m_bySelectedMapLocationID == DUNGEON_DEKANES 
    				|| m_bySelectedMapLocationID == DUNGEON_IBLESS 
    				|| m_bySelectedMapLocationID == DUNGEON_OMINOUS02 
    				|| m_bySelectedMapLocationID == DUNGEON_VOLCANE
    				|| m_bySelectedMapLocationID == DUNGEON_WdHeaven01
    				|| m_bySelectedMapLocationID == DUNGEON_WdHeaven02
    				|| m_bySelectedMapLocationID == DUNGEON_WdHeaven03 
    				|| m_bySelectedMapLocationID == DUNGEON_WdHeaven04 
    				|| m_bySelectedMapLocationID == DUNGEON_WdHeaven05 
    				|| m_bySelectedMapLocationID == DUNGEON_HERNEOS_1 )
    				{
    					m_pMapTexture = pMapComboBoxData->GetMapTexture();
    				if(!m_pMapTexture && pMapComboBoxData->GetPictureFileName() != _T(""))
    					m_pMapTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( _T( "Theme\\" ), ::GetLanguage(), pMapComboBoxData->GetPictureFileName() ), 0xff000000 );					
    				}
    				else
    				{
    					m_pMapTexture = pMapComboBoxData->GetMapTexture();
    				if(!m_pMapTexture && pMapComboBoxData->GetPictureFileName() != _T(""))
    					m_pMapTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( _T( "Theme\\" ), ::GetLanguage(), pMapComboBoxData->GetPictureFileName() ), 0xff000000 );
    	
    				}
    			break;
    		}
    	}
    }

    And MapInformationManager.cpp
    Code:
    BOOL CMapInformationManager::LoadPropMapComboBoxData( void )
    Spoiler:
    Code:
    		/*if( strMapPictureFileName != _T( "" ) )
    		{
    			CTexture* pMapTexture = CWndBase::m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( _T( "Theme\\" ), ::GetLanguage(), strMapPictureFileName ), 0xff000000 );
    			pMapComboBoxData->SetMapTexture( pMapTexture );
    		}*/

  6. #6
    Cya Groxy101 is offline
    MemberRank
    Apr 2010 Join Date
    419Posts

    Re: Client loading time takes alot longer

    Thanks, I will take a look at that.

  7. #7
    Cya Groxy101 is offline
    MemberRank
    Apr 2010 Join Date
    419Posts

    Re: Client loading time takes alot longer

    Quote Originally Posted by raventh1984 View Post
    The only downside is that if an user press the M-key for the map it freezes for about 0.5sec. after that the problem is gone.
    @reventh1984 you won't even notice the freeze.

    @iNab thanks it works :)



Advertisement