Well. I don't know what version of the tile-class script you are using. I am guessing you are using a Class Tilemap script (?)
In that case I know there is one around (from SephirothSpawn) that "remap" things using the whole range of map datas. Which may be an issue if the map is huge
In other word : in the refresh method you should have 3 loops (in the version I know)
(version 0.91)
# Passes Through Layers
for z in 0...@map_data.zsize
# Passes Through X Coordinates
for x in 0...@map_data.xsize
# Passes Through Z Coordinates
for y in 0...@map_data.ysize
Obviously you dont want the loop to pass through all the datas, especially if your map is big. So you'd better have something like
# Passes Through Layers
for z in 0...@map_data.zsize
# Passes Through X Coordinates
for x in [0,$game_player.x-10].max...[@map_data.xsize,$game_player.x+10].min
# Passes Through Z Coordinates
for y in 0...[0,$game_player.y-8].max...[@map_data.xsize,$game_player.y+8].min
Ultimately, I am sure this is a good idea to use this script anyway, but this should at least slightly improve it
PS: If you have the same version as mine, there is a slight mistake in that script in terms of priority. I fixed it in case you want it (MP me)