Contacts ListView load time?

Hello!

Home page of the application is a list of all the contacts stored on the device.  I recover contacts using the () ContactService contacts (filters); For the some 200 + contacts it takes time to display the loading list. So I used a mechanism for paging as suggested. But the listview still takes a while to load (it seems to me that updates of the ListView when all contacts are loaded by opposition to refresh with new paged contacts).

It is, unsurprisingly, worse with more contacts. For example, for 2 k + contacts, it takes about 2. a few seconds to load.

Here's the code that loads the contacts:

    mModel->clear();

    const int maxLimit=200;

    ContactListFilters filter;
    filter.setLimit(maxLimit);

    ContactService service;
    QList contacts;

    do
    {
       contacts=service.contacts(filter);

       loadContacts(contacts);

        if (contacts.size() == maxLimit)
        {
            filter.setAnchorId(contacts[maxLimit-1].id());
        }
        else
        {
            break;
        }
    } while (true);

and, loadContacts (QList):

void ContactsView::loadContacts(QList contacts){

    QVariantList list;

    foreach(Contact c,contacts){

               QVariantMap map;
               map["fName"]=c.displayName();

               QString path;

           if(c.smallPhotoFilepath().isEmpty()){path="asset:///images/contact.png"; }
               else { path="file://"+c.smallPhotoFilepath(); }

               map["photo"]=path;
               list.push_back(map);
            }

            mModel->insertList(list);

}

Any suggestions? What I am doing wrong?

UI will not get updated until c code ++ is done, only way around, I have found is to put the code c ++ inside its own thread and send signals with the partial result every now and then, so for your application, each 200 contacts he would send a signal with these contacts in a dataModel or a QVariantMap.

Tags: BlackBerry Developers

Similar Questions

  • I can't open all the Web sites in firefox(version 25), its long loading time, help please

    I can't open all the Web sites in firefox(version 25), its long loading time, help please

    Hello, normally these problems are caused by a security/firewall software which does not recognize and therefore blocks the new versions of firefox: solve connection problems to websites after Firefox update

  • Is any application of Benchmarking available in FFOS? Basically, I want to compare the performance as 'time to load application', "Image load time", etc.

    I'm basically performing team. Working in porting gecko 1.2. We did successfully porting. But we believe that it is not as big as gecko 1.1 performance. If we want any tool/app to measure performance.
    (1) application of loading time
    (2) time of image rendering
    (3) audio integrated
    (4) key response time
    (5) browser, loading time
    etc.

    Hello

    Thank you for your interest in Firefox OS. In the application settings click the device information > more information > developer. You will find tools for dev for load time, frames per second, etc.

    Best regards
    Michelle Luna

  • Slow load time

    Any ideas why the Sansa Fuze + takes a long time to load? 5 hours for a full Charge?

    Slow load time means that the usb port is off a small amount of power. If you are using a desktop pc, use a usb port back as the front are usually of low power. If you use a laptop, then plug the laptop power supply before you start to charge the player. For faster loading, use a usb adapter which is rated at 1 amp output (1 000 my). Most usb adapters only put my well of about 500.

  • HP pavilion slimline s5-1114 (win7) Long loading time

    Hi, my s5-1114 recently got extremely load times long(2-5min) when I start a program (games, internet explorer, etc. etc) for the first time, after I turned on the computer. I tried to load the pc in safe mode and the LAG disappeared but I can't seem to find the problem.

    Thanks in advance.

    Hello

    Please try this link might help you solve your problem.

    How to do a clean boot

  • I want to increase the frequency with which my laptop computer's clock is set automatically by contacting an internet time server.

    I want to increase the frequency with which my laptop clock is set automatically by contacting an internet time server. In XP, there is a registry setting for the number of seconds between contacts with a time server. Where is this setting in Vista Home Premium 64-bit?

    Hello

    I'm in Seattle and generally use time of Microsoft servers

    This is a list of time - stratum servers 1 and 2 levels.

    A list of time servers Simple Network Time Protocol (SNTP) that are available on the Internet
    http://support.Microsoft.com/kb/262680

    World time server
    http://www.WorldTimeServer.com/

    World time server - Seattle (online)
    http://www.WorldTimeServer.com/current_time_in_US-WA.aspx?city=Seattle

    The State of Washington
    http://www.WorldTimeServer.com/current_time_in_US-WA.aspx

    The naval Observatory time
    http://www.usno.Navy.mil/USNO/time

    This list, the phone number for time to Naval Observatory, CO - + 1 719 567-6742 (Colorado Springs)
    and there is more information and links.
    http://Wapedia.mobi/en/United_States_Naval_Observatory

    Sorry, no info on the atomic clock at the phone number. Maybe try your favorite search engine.

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Slow loading time

    My site load times have slowed considerably since Muse last updated. Checked in Safari, Firefox and Chrome - ideas? Site is h2oonstone.com - thanks

    You have a backup of your files? You can return to your previous version and see if you can reproduce this problem?

    How to find and install a previous Version of Adobe Apps in CC 2015 | Adobe Customer Care Team

  • Improve load times

    I use LR 6.5 on a PC with these stats:

    -OS = Windows 10 Home 64-bit

    -Processor = Intel Core i7 4500U 1.80 GHz

    -RAM = 8.00 GB Single - Channel DDR3 @ 798 MHz

    -Storage = 1862 GB Western Digital WD my Passport USB Device (SUB (SATA) 0827

    I use a laptop now instead of my old office and the loading time is very slow.  Is the speed of loading photo (in the Panel of a development library) led by the hardware I use or is there something I can do in LR that accelerate?  I really hope that I can speed up since I was 4 000 pictures to review on my last trip.

    Thanks for your help.

    RR

    If you have enabled the graphics acceleration, turn the power off (preferences-> Performance tab-> clear the check box)

    Opening a file to develop speed is mainly driven by the CPU. By today's standards, your processor is pretty slow. You would probably get a faster processor

  • The loading time of a Web page takes about 30 seconds. How can I improve this

    It comes to this page: http://www.barronstudio.nl/hoogstraat-2-bergen-op-zoom.html

    Hello CreativeBarron,

    I checked your site at my end and observed that you used several large images in Muse that contributes to the load time. Please look at the screenshot below.

    By reducing the size of these images, you can certainly reduce the loading time of the site.

    Kind regards

    Vivek

  • Suggestions for optimazion (improve loading times, format adjustments for different resolutions) for my homepage?

    Dear Helper,

    I have problems with:

    -a loading time very long on my homepage

    -with the clear understanding on small resolutions (small laptops).

    You have ideas for this problem?

    Thank you

    Ron

    www.Oybiner-huette.de

    Hello

    In addition, take a look at this article

    Optimize images in Adobe Muse | Adobe Muse CC tutorials

  • How to speed up site load times?

    Can someone tell me how to speed up site load times?

    I know that the affects of size of image loading time... more tips?

    If you could take a look at my site and tell me how bad it is that would be great!

    www.ligacreative.com

    (1) do not use GIF images. The only time where .gif must always be used would be for small moving images (which, IMO, is a questionable practice 'design'). Muse won't touch a GIF image. It will be passed through. Image http://www.ligacreative.com/images/ieva-lc.gif your site into an image of 35 million pixels (HUGE). It is the only represent 4 seconds to download on the connection time average US broadband. Convert to PNG or JPEG, and replace the image within the Muse and Muse will be resize and recompress the image to the output of a small fraction of its current size of file.

    (2) use JPG of an image that is photographic in nature.

    (3) use the PNG for images that are generated by computer (i.e. images with hard edges or areas of color United, where the JPEG compression is likely to put objects in the image). If you have this type of images, deselect "Convert PNG" opaque in JPEG in the properties of the Site.

    (4) use the PNG for images that contain areas totally or partially transparent (as JPEG doesn't support transparency).

    (5) avoid having transparency in photographic images when possible. If you can cook the background color in the image, do. An opaque image can be JPEG. If there is no transparency in the image, it should be PNG (or GIF). For a photographic image PNG is about 5 times more grand and so 5 times longer to download than a comparable JPEG.

    (6) to resize the images as images of background fill for browser filling, fill the page or fill to an object of width 100% browser before importing. Muse does not automatically resize these images, then you must decide what your site maximum screen width Web will be targeting and resize these images outside Muse prior to importation.

  • Loading time of extension has suddenly skyrocketed

    So before Illustrator update this week, my HTML5 extensions loaded until recently almost instantly. Now, when I opened them, they freeze Illustrator for 60 to 90 seconds, then load. I couldn't see anything in the notes to the extensions. What has changed?

    I think I have it narrowed down to my task manager, GulpJS. I removed SWIG modules at the signature of the extension and the loading times are back to normal. Strange, but this is the solution I found.

  • Advice needed on speeding up load times.

    I need some tips on how I can speed up the load time on a page of my site. This page: http://www.thinksmartresumes.com.au/%2499-designs.html

    I know there are hundreds of localized factors, including the Internet, but many people have now pointed out that this page take more than 30 seconds to load. I know it's a great page with a lot of png and the links. What can I do to speed things up?

    Any advice welcome outside to split the page (which are not an option). I can't read the code btw.

    Congratulations to all.

    Now we need 6.2 MB to download the content and 5.8 for the images.

    If the performance is improved with the resizing of the images.

    Thank you

    Sanjit

  • How can I speed up the load time of my site?

    Hello

    How can I speed up the load time of my site hosted on BusinessCatalyst.

    http://www.PW-energy.co.UK

    Is there a way to compress?

    Any help much apprecated.

    Thank you

    Hello

    The page/site seems to load very well at the moment.

    However if want to inspect what could slow down the loading of your page I recommend using 'firebug' and select the 'network' tab to follow every chronology file loading.  Then you can see which file takes more time to load to help make adjustments accordingly.

    http://getfirebug.com/

    Kind regards

    -Sidney

  • Animated border and wordpress: loading time

    Hi lovely people of edge!

    I have a site for which I develop some interactive maps using edge. I have no idea how the code so most of my functions is limited to the deactivation of the elements to get things to do what I want. Very basic, I know, please don't laugh too much!

    It's a (custom) Wordpress site and I use the plugin suite of edge to get the edge on the site animations.

    My question is about the load time and the size of file for edge entertainment. My .oam files are approximately 1.5 to 2 MB. Is this great? Should I aim for smaller?

    This is a link to a page on the site:

    e-sheep-at-a-beautiful-coastal-Farm-Park/ http://everywhereyougo.co.nz/2013/04/Duder-Regional-Park-Walking-and-picnicking-amongst-th

    The animation of edge load she particularly slow for you? Doesn't load it at all? I would be interested in your comments!

    Thank you much in advance,

    Lisa in New Zealand.

    Hey, Lisa.

    The animation loaded for me very well, but look in the Net Panel in Firebug shows that a number of your SVG is more of 300K.  This seems quite expensive in a perspective of bandwidth, and the fact that you have a handful of these files which size adds up to 2MB fairly quickly.  Hope that helps,

    -Elaine

Maybe you are looking for