Index: trunk/src/engine/resource_system.cc
===================================================================
--- trunk/src/engine/resource_system.cc	(revision 430)
+++ trunk/src/engine/resource_system.cc	(revision 431)
@@ -15,5 +15,5 @@
 }
 
-nv::resource_id nv::resource_manager_base::load_resource( const std::string& id )
+nv::resource_id nv::resource_manager_base::load_resource( const string_view& id )
 {
 	lua::table_guard table( m_lua, lua::path( get_storage_name(), id ) );
@@ -32,14 +32,14 @@
 		lua::table_guard sub_table( table, i+1 );
 		resource_id rid = load_resource( sub_table );
-		if ( rid != 0 ) m_names[ sub_table.get_std_string("id") ] = rid;
+		if ( rid != 0 ) m_names[ sub_table.get_string_hash_64("id") ] = rid;
 	}
 }
 
-nv::resource_type_id nv::resource_system::register_resource_type( const std::string& /*name*/, resource_manager_base* /*manager*/ )
+nv::resource_type_id nv::resource_system::register_resource_type( const string_view& /*name*/, resource_manager_base* /*manager*/ )
 {
 	return 0;
 }
 
-nv::resource_type_id nv::resource_system::get_resource_type_id( const std::string& /*name*/ ) const
+nv::resource_type_id nv::resource_system::get_resource_type_id( const string_view& /*name*/ ) const
 {
 	return 0;
Index: trunk/src/formats/assimp_loader.cc
===================================================================
--- trunk/src/formats/assimp_loader.cc	(revision 430)
+++ trunk/src/formats/assimp_loader.cc	(revision 431)
@@ -288,5 +288,5 @@
 	const aiScene* scene = reinterpret_cast<const aiScene*>( m_scene );
 	mesh_nodes_data* result = new mesh_nodes_data( make_name( "bones" ) );
-	unordered_map< uint64, uint16 > names;
+	hashed_table< shash64, uint16 > names;
 	for ( unsigned int m = 0; m < m_mesh_count; ++m )
 	{
Index: trunk/src/formats/md3_loader.cc
===================================================================
--- trunk/src/formats/md3_loader.cc	(revision 430)
+++ trunk/src/formats/md3_loader.cc	(revision 431)
@@ -420,5 +420,5 @@
 	uint32 node_count = uint32( md3->header.num_tags );
 	if ( node_count == 0 ) return nullptr;
-	mesh_nodes_data* result = new mesh_nodes_data( m_strings ? m_strings->insert( "tags" ) : 0 );
+	mesh_nodes_data* result = new mesh_nodes_data( m_strings ? m_strings->insert( "tags" ) : shash64() );
 	for ( uint32 i = 0; i < node_count; ++i )
 	{
Index: trunk/src/formats/nmd_loader.cc
===================================================================
--- trunk/src/formats/nmd_loader.cc	(revision 430)
+++ trunk/src/formats/nmd_loader.cc	(revision 431)
@@ -233,5 +233,5 @@
 	sheader.children   = 0;
 	sheader.size       = strings.dump_size();
-	sheader.name       = 0;
+	sheader.name       = shash64();
 	sheader.parent_id  = -1;
     sheader.attributes = 0;
Index: trunk/src/gfx/skeletal_mesh.cc
===================================================================
--- trunk/src/gfx/skeletal_mesh.cc	(revision 430)
+++ trunk/src/gfx/skeletal_mesh.cc	(revision 431)
@@ -177,5 +177,5 @@
 	{
 		const data_channel_set* bone = (*bones)[ bi ];
-		bone_names[ bone->get_name() ] = bi;
+		bone_names[ bone->get_name().value() ] = bi;
 		m_offsets[bi] = bone->get_transform();
 	}
@@ -186,5 +186,5 @@
 		sint16 bone_id = -1;
 
-		auto bi = bone_names.find( node->get_name() );
+		auto bi = bone_names.find( node->get_name().value() );
 		if ( bi != bone_names.end() )
 		{
Index: trunk/src/lua/lua_map_area.cc
===================================================================
--- trunk/src/lua/lua_map_area.cc	(revision 430)
+++ trunk/src/lua/lua_map_area.cc	(revision 431)
@@ -137,5 +137,6 @@
 {
 	nv::map_area* ma = to_map_area( L, 1 );
-	lua_pushstring( L, ma->id_to_string( ma->get_cell( to_coord( L, 2 ) ) ).c_str() );
+	nv::string_view result( ma->id_to_string( ma->get_cell( to_coord( L, 2 ) ) ) );
+	lua_pushlstring( L, result.data(), result.size() );
 	return 1;
 }
Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 430)
+++ trunk/src/lua/lua_state.cc	(revision 431)
@@ -184,5 +184,5 @@
 }
 
-uint64 nv::lua::table_guard::get_string_hash_64( string_view element, uint64 defval /*= 0 */ )
+shash64 nv::lua::table_guard::get_string_hash_64( string_view element, uint64 defval /*= 0 */ )
 {
 	lua_getfield( m_state, -1, element.data() );
@@ -196,5 +196,20 @@
 	}
 	lua_pop( m_state, 1 );
-	return result;
+	return shash64( result );
+}
+
+shash64 nv::lua::table_guard::get_string( string_view element, string_table& table, uint64 defval /*= 0 */ )
+{
+	lua_getfield( m_state, -1, element.data() );
+	size_t l = 0;
+	const char* str = nullptr;
+	uint64 result = defval;
+	if ( lua_type( m_state, -1 ) == LUA_TSTRING )
+	{
+		str = lua_tolstring( m_state, -1, &l );
+		result = table.insert( string_view( str, l ) ).value();
+	}
+	lua_pop( m_state, 1 );
+	return shash64( result );
 }
 
