optimize seen_materials checking performance by pre save it to an array
eager load materials with files
futher refine code
Merge pull request #252 from wangqiang1208/features/material-eager-loading

further optimisations for materials