Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:44:57+00:00 2026-06-08T14:44:57+00:00

I’m porting some Objective-C to Android. The source app stores a lot of data

  • 0

I’m porting some Objective-C to Android. The source app stores a lot of data in structure arrays and has some high performing methods to do lookups into the arrays and calculations on the result sets to provide near real time analysis of points on a graph as the user drags a pointer around the graph with their finger. The calculation results are used to update values in various views surrounding the graph.

Here’s an example which contain approx 7.5k structures.

structDataFeedReduced gFeedData[7662] = {
1233,@"",12.466667,26.166667,@"AARS",0,0,0,1.000000,-1,1,1,
6760,@"",15.816667,41.033333,@"DCTT",1,1,1,12.000000,-1,1,2,
8117,@"",44.016667,144.283333,@"SKDD",2,1,2,9.000000,-1,1,1,
8666283,@"WS",42.676666,40.006668,@"DLCC",3,2,3,-5.000000,-1,1,6,
...
...
...
};

My question is what is the best way to store this data statically in Java?

I’ve tried the following which are not high enough performance, either at load time or to provide data to the calculations at run time.

  1. SQL Lite.
  2. Reading from files stored in assets.
  3. Storing statically as string arrays then processing them in initialisation into objects, using a class which mirrors the Objective-C structure (e.g. converting to int, bools, doubles etc from the string data)
  4. Storing in arrays.xml then processing them in initialisation into objects

Are there any other patterns I could try? If there are none, then I’ll favour 3 or 4 above as I’ll sacrifice some loading and initialisation performance for good runtime response.

My backstop would be to push this down into native code using JNI. Perhaps this is the only option that makes sense?

Thanks…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:44:58+00:00Added an answer on June 8, 2026 at 2:44 pm

    You can just keep that data as code. You could define a StructDataFeedReduced class, then change your initialization code to:

    static StructDataFeedReduced[] gFeedData = new StructDataFeedReduced[] {
        new StructDataFeedReduced(1233,"",12.466667,26.166667,"AARS",0,0,0,1.000000,-1,1,1),
        new StructDataFeedReduced(6760,"",15.816667,41.033333,"DCTT",1,1,1,12.000000,-1,1,2),
        ...
    }
    

    The constructor of StructDataFeedReduced can store the data in internal fields as appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.