New, more efficient Maps.

Don't these deck chairs look GREAT?


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@871 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2009-08-24 02:55:56 +00:00
parent 69a978d819
commit e2b8ac9d42
3 changed files with 9 additions and 6 deletions
@@ -22,7 +22,8 @@
package com.threerings.parlor.client { package com.threerings.parlor.client {
import com.threerings.util.ArrayUtil; import com.threerings.util.ArrayUtil;
import com.threerings.util.HashMap; import com.threerings.util.Map;
import com.threerings.util.Maps;
import com.threerings.util.Log; import com.threerings.util.Log;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -236,7 +237,7 @@ public class ParlorDirector extends BasicDirector
/** A table of acknowledged (but not yet accepted or refused) invitation requests, keyed on /** A table of acknowledged (but not yet accepted or refused) invitation requests, keyed on
* invitation id. */ * invitation id. */
protected var _pendingInvites :HashMap = new HashMap(); protected var _pendingInvites :Map = Maps.newMapOf(int);
/** We notify the entities on this list when we get a game ready notification. */ /** We notify the entities on this list when we get a game ready notification. */
protected var _grobs :Array = new Array(); protected var _grobs :Array = new Array();
@@ -25,7 +25,8 @@ import flash.errors.IOError;
import flash.errors.IllegalOperationError; import flash.errors.IllegalOperationError;
import com.threerings.util.Log; import com.threerings.util.Log;
import com.threerings.util.LRUHashMap; import com.threerings.util.Map;
import com.threerings.util.Maps;
import com.threerings.util.ResultListener; import com.threerings.util.ResultListener;
import com.threerings.io.TypedArray; import com.threerings.io.TypedArray;
@@ -558,7 +559,7 @@ public class SceneDirector extends BasicDirector
protected var _fact :SceneFactory; protected var _fact :SceneFactory;
/** A cache of scene model information. */ /** A cache of scene model information. */
protected var _scache :LRUHashMap = new LRUHashMap(5); protected var _scache :Map = Maps.newLRIMap(5, Maps.newMapOf(int));
/** The display scene object for the scene we currently occupy. */ /** The display scene object for the scene we currently occupy. */
protected var _scene :Scene; protected var _scene :Scene;
@@ -23,7 +23,8 @@ package com.threerings.whirled.spot.data {
import com.threerings.util.ArrayIterator; import com.threerings.util.ArrayIterator;
import com.threerings.util.Iterator; import com.threerings.util.Iterator;
import com.threerings.util.HashMap; import com.threerings.util.Map;
import com.threerings.util.Maps;
import com.threerings.util.Log; import com.threerings.util.Log;
/** /**
@@ -147,7 +148,7 @@ public class SpotSceneImpl
protected var _smodel :SpotSceneModel; protected var _smodel :SpotSceneModel;
/** A mapping from portal id to portal. */ /** A mapping from portal id to portal. */
protected var _portals :HashMap = new HashMap(); protected var _portals :Map = Maps.newMapOf(int);
/** We don't allow more than ~32k portals in a scene. Things would /** We don't allow more than ~32k portals in a scene. Things would
* slow down *way* before we got there. */ * slow down *way* before we got there. */