ASSIMP in my project is way slower than ASSIMP VIEW in executing aiImportFileExWithProperties

mamo139
2013-10-13
2013-10-15
  • mamo139
    mamo139
    2013-10-13

    Hi all,

    I copied the function from assimp view source code:

    aiPropertyStore* props = aiCreatePropertyStore();
    
    aiSetImportPropertyInteger(props,AI_CONFIG_IMPORT_TER_MAKE_UVS,1);
    aiSetImportPropertyFloat(props,AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE,80.f);
    aiSetImportPropertyInteger(props,AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE | aiPrimitiveType_POINT);
    aiSetImportPropertyInteger(props,AI_CONFIG_GLOB_MEASURE_TIME,1);
    //aiSetImportPropertyInteger(props,AI_CONFIG_PP_PTV_KEEP_HIERARCHY,1);
    
    // Call ASSIMPs C-API to load the file
    scene = (aiScene*)aiImportFileExWithProperties(pFile.c_str(),
        ppsteps | /* default pp steps */
        aiProcess_GenSmoothNormals         | // generate smooth normal vectors if not existing
        aiProcess_SplitLargeMeshes         | // split large, unrenderable meshes into submeshes
        aiProcess_Triangulate              | // triangulate polygons with more than 3 edges
        //aiProcess_ConvertToLeftHanded    | // convert everything to D3D left handed space
        aiProcess_SortByPType              | // make 'clean' meshes which consist of a single typ of primitives
        0,
        NULL,
        props);
    
    aiReleasePropertyStore(props);
    

    but assimp view is able to load and then show the model in 2 seconds... while my application it takes more than 1 minute just to run aiImportFileExWithProperties...

    I also use the same dll of Assimp view, so the code should be identical.

    any idea about why this might happen?
    Thank you

     
    Last edit: mamo139 2013-10-13
  • Kim Kulling
    Kim Kulling
    2013-10-15

    Hard to say, have you try to run the app in a profiler? Or do you use the debug versin for your tests?

    Kimmi