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 3721540
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:35:30+00:00 2026-05-19T05:35:30+00:00

i use a table view with custom values and image. Every rows do this

  • 0

i use a table view with custom values and image.

Every rows do this:
– Check device (iphone/ipad)
– Parse a wordpress xml
– Split this string “Thu, 13 Jan 2011 22:26:27 +0000” and get pos[1] and pos[2].
– Convert “Jan” in “Gennaio”
– set values in row cell

It’s make in this way:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {    
    @try {
        newsRow = ((NewsRowController *)[tableView dequeueReusableCellWithIdentifier:@"cell"]);
        if (newsRow == nil) {

            if ( [[Device GetModel] isEqualToString:@"iPad Simulator"] || [[Device GetModel] isEqualToString:@"iPad"])
                [[NSBundle mainBundle] loadNibNamed:@"NewsRow_ipad" owner:self options:nil];
            else [[NSBundle mainBundle] loadNibNamed:@"NewsRow" owner:self options:nil];

            if ([tableArray count] > 0) {               
                NSArray *chunks = [[dataArray objectAtIndex:indexPath.row] componentsSeparatedByString: @" "];

                [newsRow setCellDataWithName:[tableArray objectAtIndex:indexPath.row]  
                                     andDate:[descArray objectAtIndex:indexPath.row] 
                                         day:[chunks objectAtIndex:1] 
                                       month:[self convertMonthToExtended:[chunks objectAtIndex:2]]];
            }
        }       
    }
    @catch (NSException * e) {
        NSLog(@"OK, crashato. Sappiamo il perchè!");
    }

    return newsRow;
}

the function convertMonthToExtended do this:

if ([small isEqualToString:@"Jan"]) return @"gennaio";
[...]
if ([small isEqualToString:@"Dec"]) return @"dicembre";

Now, on simulator it works very fine, but on device, a 3G device in particular, when i scroll the table it scroll slowly because i do a lot of things.

How can i speed up the scroll?
What is correct way to re-implement this function to be more fast?
How can i optimize this snippet?

Any idea please?

thanks,
A

  • 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-05-19T05:35:31+00:00Added an answer on May 19, 2026 at 5:35 am

    I think that you can move the following code:

    if ( [[Device GetModel] isEqualToString:@"iPad Simulator"] || [[Device GetModel] isEqualToString:@"iPad"])
                    [[NSBundle mainBundle] loadNibNamed:@"NewsRow_ipad" owner:self options:nil];
                else [[NSBundle mainBundle] loadNibNamed:@"NewsRow" owner:self options:nil];
    

    Outside the tableView:cellForRowAtIndexPath: method because you don’t need to do this check for every row (the device doesn’t change from line to line). And you can put this code in viewDidLoad .

    I suggest you do all the computations and the work of asynchronous network.
    You can precomputare all the information you need to populate the rows and save them in such a NSArray while viewing a UIProgressView or something like that, only after all the operations populate the table view.
    You can use the [Tableview reloadData] method to reload all data in the table view, this mean that numberOfSectionsInTableView: , tableView:numberOfRowsInSection:, and all the data source method are recalled.

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

Sidebar

Related Questions

I have very custom TableView like Add Contact View in iPhone's Contacts. I like
in my program, I'm implementing a custom view, a bit like a table view.
i need a report and i should use pivot table for it.Report will be
Currently we have a table that we use to track inivitations. We have an
I would like to use an SQL Server table as an action queue. So
I'm want to use either a hash table or a dictionary in my access
If I use null as a representation of everything in a database table is
I want to use an existing user and user group table that the forums
How to figure out if a table is in use in SQL (on any
While trying to use LINQ to SQL I encountered several problems. I have table

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.