#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    33
    Rep Power
    4

    Design help for memory limited application.


    Its more of a question about how this works. I have a mobile based website, that being said the devices it targets will be limited on memory, too much and theyll crash.

    I have the need for approximately 100 names and descriptions that will need to be accessible. I was thinking about making a hashmap of them to create something like:

    thing("Person1", ID1)
    thing("Person2", ID2)
    (obviously really bad psuedocode)

    But what Im asking is, would an approach like this be heavily memory consuming? If so would there be a better approach?

    I know this is rather confusing I cant explain this very well but thanks for any help.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Is this for an app or a mobile website? Do you require help with Java or Javascript? HashMaps are a Java interface, which is why I am asking.
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    33
    Rep Power
    4
    Originally Posted by Winters
    Is this for an app or a mobile website? Do you require help with Java or Javascript? HashMaps are a Java interface, which is why I am asking.
    Its a mobile website with javascript, I was used HashMap in the wrong wording I just mean some sort of hashtable/dictionary/associative array type thing. Which I ended up using an associative array formatted like this.
    var personArray=[
    ["Person1","first.png"],
    ["Person2","second.png"],
    ["Person3","third.png"],
    ["Person4","fourth.png"]]

IMN logo majestic logo threadwatch logo seochat tools logo