Is it advisable to use arrays in Javascript using tens of thousands of indexes?

No I'd keep the table, as its a single point of maintenance You'll find that doing a XmlHTTPRequest to return a key/value pair based on a server side query, would actually perform faster, and have significantly less memory footprint than a huge JavaScript array.

No. I'd keep the table, as its a single point of maintenance. You'll find that doing a XmlHTTPRequest to return a key/value pair based on a server side query, would actually perform faster, and have significantly less memory footprint than a huge JavaScript array.

In my experience, moving beyond a few thousand lines in an array cached client-side in a browser led to hellish experiences. Bloated browser memory footprints, slow load times and general sluggishness were the order of the day. You should test this scenario yourself for the experience.It's worth the few minutes it'd take you.

The main thing to take into consideration is end-user performance. Assuming that it works well on your machine will not mean it works well on an older machine. The riskiest part about the client-side aspect of your approach is that it depends heavily on what the client has.

Personally, I would avoid putting that much data to the client, but I don't know enough of the background to your project to determine why you might need to do this. Some sort of AJAX approach retrieving cached data from the server might be more appropriate.

I have a database which contains a table of static data, meaning that it will never change. In this case would it be advisable to convert this table to a javascript array and look the info up in there when needed? Is this bad practice?

The table in question contains roughly 40,000 key/value pair entries.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions