Added more optimization pragmas to module Resource.