need advice about the responsiveness of the file system

I am writing an application that retrieves data from a url and stores it in the file system (under /store for now, but perhaps under /sdcard later). When I need to get out over http, the application always displays a message of 'work' and does the job in another thread. This way at least the user knows the app is not dead (or at least has that impression ). The worker thread invokes an executable to clear the message when it is done or encounters an error.

When the application needs to do something about the local file system only, the situation looks different. The amount of work is not always very well - read or write a small (1-2KB) file, delete a file, etc.. In the Simulator, this seems to happen fairly quickly that the message of 'work' to the top of long enough not to be read. So I tried to do the job directly in the case where the wire and everything seems all right, at least on the Simulator.

I read that the performance of the file system on real devices is slower than in the Simulator. The question I have is: how much slower? Are slow enough real devices for simple file operations that I should stay with the worker thread and a message of 'work '? The goal here is to prevent the user to ask if the app is dead. I realize that I could use a worker thread just to be safe, but I reduced on the complexity of its use and unnecessary code thread.

Compared to the Simulator, all devices will be slow.  My experience with small files on the device indicates that looking to the answer for the second time with readings being the faster of course.

Tags: BlackBerry Developers

Similar Questions

  • Need to find the file system 32, "WINDOWS\system32\run32dll.exe."

    Virus caused a file disappear from system32 in Windows XP System32\run32dll.exe.

    Did you remove the virus?

    http://support.Microsoft.com/kb/812340

    To resolve this issue, follow these steps:

    1. Put the CD ROM Windows XP disc in the CD ROM drive
    2. Click Startand then click run.
    3. Type expand: X: \i386\rundll32.ex_ c:\windows\system32\rundll32.exe
      in the Open box, where X is the letter of your CD drive.
    4. Restart the computer.
  • Guard application launch at the start of the appliance, also need advice for the implementation of network methods

    Hi all

    I'm new to the development of Blackberry and I'm writing a relatively simple application to run on 7.1.

    So far the development was interesting, I managed to create my user interface using resources online (mainly this forum), but today I tried to implement some of the network classes that I need and now I just met constant problems.

    I use Eclipse SDK 3.7.2 (the one that comes with the plugin RIM)

    First question:

    I'm not sure what I changed, but today I noticed that whenever I start the Simulator (by sim 9360) my application is started during the initial startup process. I don't think he did this before, but to be honest, I wasn't paying much attention. I think it starts at the start of the device is because I put a breakpoint in the constructor for my class from the main screen, which is hit before the Simulator happens even to the point where it is ready for user interaction. In addition, once it is ready, if I press the BB button, I see my registered application.

    I don't have it set to automatic start in .xml descriptior enforcement.

    I started this application on the HelloBlackBerry sample, here is my main method for the entry of the application:

    public static void main( String[] args ) {
            appSettings = AppSettings.fetch();
            // Create a new instance of the application and make the currently
            // running thread the application's event dispatch thread.
            HelloBlackBerry theApp = new HelloBlackBerry();
            theApp.enterEventDispatcher();
            //openConnection();
    
        }
    
    
    

    As far as I know, this is the only entry point for the application.

    More code

        public HelloBlackBerry() {
            // Push a screen onto the UI stack for rendering.
            mainScreen = new ScreenHelloBlackBerry();
            pushScreen( mainScreen );
        }
    

    Here is the method of. my class AppSettings fetch()

        // Retrieves a copy of the effective properties set from storage.
        public static AppSettings fetch()
        {
            AppSettings savedSettings = (AppSettings) _store.getContents();
            return new AppSettings(savedSettings);
        }
    

    Some of this code that I wrote myself, the persistence store cause the launch of my car?

    I tried to reset the Simulator to the factory settings, no change.

    All applications initialized during the startup of the device and then closed shortly after?

    Part 2: Need advice for the implementation of functions of network in the application

    I need to implement some methods that will retrieve data from a web service, and I also need to send data to this service. What I've read, the ConnectionFactory is the way to go. I want my application to make a request when the application is open and can check on a set interval. I didn't know exactly how to go about adding another thread for networking, I understand that network connections should not be created on the thread main event, so I tried to do this:

    The constructor of my class that implements screen (ScreenHelloBlackBerry), I use the following to create a modal dialog box to prompt the user for a username, I also try networking wire in the same segment of spawning:

            public ScreenHelloBlackBerry(){...initialize fields and managers, add it all together...then near the end
    
    //This will open the confirm dialog when the application is launched
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                  public void run() {
                      openConfirmDialog();
                    //start connection - Possibly broken
                      ConnectionThread ct = new ConnectionThread();
                      ct.start();
                  }
            });
    

    I don't know if it's somehow OK to do, but it seems to work for what I need. I want a user who launches the application at the prompt, and if a user switch applications, when they come back they wondered again (unless they close the app and reopen it).

    Here is my ConnectionThread:

    public class ConnectionThread extends Thread
    {
    
        public void run()
        {
    
              ConnectionFactory connFact = new ConnectionFactory();
              ConnectionDescriptor connDesc;
              connDesc = connFact.getConnection("http://www.google.com");
              if (connDesc != null)
              {
                  HttpConnection httpConn;
                  httpConn = (HttpConnection)connDesc.getConnection();
                  try
                  {
                      final int iResponseCode = httpConn.getResponseCode();
                      UiApplication.getUiApplication().invokeLater(new Runnable()
                      {
                          public void run()
                          {
                              Dialog.alert("Response code: " +
                                            Integer.toString(iResponseCode));
    
                          }
                       });
                      httpConn.close();
    
                   }
                   catch (IOException e)
                   {
                     System.err.println("Caught IOException: "
                          + e.getMessage());
                   }
              }
        }
    }
    

    At the moment it has basically unmodified code from a sample that I found, I'll be retooling to meet my needs whenever I can make it work. I HAD this work to the point where, after the closed user confirm this dialog, a few moments later a an alert dialog appears with the 302 response code. I don't know what changed, but now it doesn't work at all, and if I try to scroll with the debugger, I can't past the httpCon.getResponseCode (). I've seen some mistakes earlier on "no record of service was set up", and I also had once a timeout exception.

    I'm sure I'm doing this wrong, but at the same time as I said WAS working, and now it is not. If someone has done this far, thank you very much for your time and advice are much appreciated.

    Also, should I try to start the thread of the network of the UIApplication class instead of the screen? There is currently very little happening in the class that extends UIApplication, do I spend most of my business logic out of the class of the screen and in the UIApplication class?

    Thanks in advance!

    Hi all

    Just to conclude this topic for those who are interested, I found an excellent guide to the implementation of networks in applications of BB, click here for a link.

    About my application being started at the start of the simulator of the device, I found that on a device real this behavior is not complied with, and in addition, the behaviour seems to have stopped after uninstallation and reinstallation of my Simulator.

    See you soon,.

  • Speed/performance of my mac mini (mid-2010) is very slow. Need help, consolidate the files, software updates, etc. in order to improve the speed and performance.

    My mac mini (mid-2010) speed/performance is very slow - think of it as a result of letting my kids do "whatever" about it in recent years.  Need help, consolidate the files, software updates, etc. in order to improve the speed and performance.  You will also need to get data out of old PowerBook G4.

    < object edited by host >

    We are users like you.  Search locally by using something like Yelp or similar

    http://www.Yelp.com/search?find_desc=Apple+repair & find_loc = Chicago, + IT & start = 0 & ortby = rating s

    or read a few links which may be relevant on this forum about the slow mac mini

    http://BFY.tw/5C63

  • Need advice on the low storage space

    I use a HP Pavilion Elite m9040n PC with Windows 7. I can see that my hard drives are almost full. I click on computer and have 2 drives.

    Computer

    HP (C 9.37 GB free of 289 GB)

    Original image (D 1.24 GB free of 9.04 GB)

    HP-Pavilion (E 34.3 GB free 298 GB)

    I'll try to expose my computer hierarchy:

    Libraries

    Photos

    986 files

    My photos (E

    883 files

    Computer

    HP (C)

    Users

    Family

    My photos

    8 articles

    Rick

    My photos

    906 files

    Network

    Rick_PC

    My photos

    883 files

    Users

    My photos

    8 articles

    Rick

    My photos

    906 files

    I like pictures being in my folder my pictures of network, because I have to log on as an administrator to change or remove. Don't like a backup so none of the body screwa originals upward.

    So I don't think I want to add an external hard drive. Rather, I would install a 3rd internal drive. What do you think? Thanks for the advice and help.

    I re - explain my comment ' I would buy 1 t in the car, one of these: Seagate or WD .

    According to your redundant backup of the file system and knowing a 1 t formats 931 GB of usage, it is 3 times your C drive. Then, I'd get the free Seagate Disk Wizard (application of cloning). WD has the same program.

    I'm removing the E drive and install the new drive. Then run the clone process. "After that, I remove the old C drive and install the new drive in its place (using Sata0 son).

    After opening the case and removing the hard drive cage.

    (1) disconnect the cables from the back of the drive e (E is attached to the Sata1 on the motherboard). If your unable to determine what is E, just disconnect the wires of a player. (The largest is the power, the data cable is small). Then try to restart the system. Only the C drive will start. Once you have determined that C is still connected, install the new drive, attach the wires that were used with the E drive.

    (2) use disk management and format the new disk 1. It will set up to 931 GB.

    Read the Manual Disk Wizard.  Article 15, beginning on page 85.

    (3) using the disk wizard, the cloning process is selected.

    (4) the process should create a new 921 GB C and D about 10 GB. It will create an exact copy of the old drive.

    (5) at the end of the reboot process. Wait for the desktop to appear and then click stop.

    Now:

    Remove the cable from the new drive. Fix the wiring in the original drive to the new drive.  Now, turn on the power. The system should boot, if you did it correctly.  Perform a shutdown. You can now remove the old C drive. You now have 320 GB (2) disks, you can use. I recommend you only to keep the old C drive intact for a few weeks.

  • OSD-04011: GetFileInformationbyHandle() failure, unable to get information about the file

    Hi all

    I try to get my ORACLE ASM (v 11.1.0.7) software works on Windows Server 2008 Standard SP2 (32-bit), but unfortunately, I hit the next windows operating system error with no resolution in sight.

    OSD-04011: GetFileInformationbyHandle() failure, unable to get information about the file
    S/O-error: incorrect function (OS 1)

    Basically ORACLE software try to read the header information of a partition of existing online RAW drive. According to the error made ORACLE unrecognized function call. How can I make this feature available? Need help ASAP please.

    http://www.Microsoft.com/windowsserver2008/en/us/community.aspx

    They will help you in Windows Server communities at the above address.

    Here is the Vista Forums.

    See you soon. Mick Murphy - Microsoft partner

  • I need to locate the file one by one?

    Normally, I put the iTunes media files on my external drive. But recently, it connects more.

    When I try to recreate a link to it, all the music in my iTunes shows "!" and cannot be read. I need to locate the file one by one to make them available again?

    There are more than 2,000 + music in my playlist. Are there other ways to locate the whole folder at the same time?

    Thank you very much

    It should connect if he did in the past. is it possible that you renamed the drive or folder in the path to the iTunes media.  This, ny the way, is one of the reasons why we suggest to keep a whole library on an external media player only.

    If you find an iTunes file should offer to find others as long have you let iTunes organize media in the past.  If this does not work then probably something got renamed on the disc.

  • I can restore the backup made by WHS v1. PP3 the WHS 2011? Or do I need to copy the files over the network of old serevr again?

    WHS backup

    You just bought a new WHS 2011. Question, can I restore the backup made by WHS v1. PP3 the WHS 2011?  Or do I need to copy the files over the network of old serevr again?

    Hello

    Because the problem is with Windows Home Server, I recommend you post this question in the Forums Windows Home Server.

  • I need to know the file current date/time number stamp and the version of "spoolsv.exe" in Vista Home Premium 32-bit with SP2.

    I need to know the file current date/time number stamp and the version of "spoolsv.exe" in Vista Home Premium 32-bit with SP2. My spooler file got corrupted and I need to know what that the stamp of date/time on the latest version of the file: spoolsv.exe. I did a search on my hard drive and found 8 copies of the file with 7 different dates. I need to know which copy in my file C:\windows\system32\. I suspect that the problem was caused by some kind of malware. I think that some of the different versions on my machine of the initial installation of the Vista, SP1 and SP2. 3 copies that would explain. I tried all the suggestions in this forum and several others. I tried sfc/scannow and it simply replaces the corrupted file by another. I understand how works this file and a simple copy will do the trick if I knew that the file to use. I know that I don't want to go back to the first version of 2006.  BTW... my symptoms are all my printers have disappeared, and when I try to 'add a new printer' I get an error message saying that my spooler service does not work. When I opened my services window it shows that indeed, he is arrested, but I will not start because the description column contains only the code garbled machine indicating that the file is corrupted, or it may contain a virus. I had been using F-Prot until this virus got by and now I use AVG. I scanned my machine with several cleaning packages and it is is more infected, but I worry that from this corrupt file grow something. I know that the problem is not with my printers or drivers, because everyone on my home network can print on all of my printers. None of the people I know are on Vista 32 bit. They are all running System 7 or XP. I have XP, except that a few years ago I suffered from the "Syndrome of Pepsi" on my laptop and when I bought a new HP, it came with Vista.

    Version 6.0.6002.18294

    Day 17/08/2010

    Duration 14:11

    Duration may vary in different time zones.

  • I'm trying to upgrade from windows vista to windows 7. whenever I start the upgrade, that he told me that count it needs to restart to allow changes to the file system.

    I'm trying to upgrade from windows vista to windows 7. whenever I start the upgrade, that he told me that count it needs to restart to allow changes to the file system. I restarted several times now and get the same message. What should I do to ensure that this computer can be upgraded?

    Hello

    Run the windows Upgrade Advisor 7

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=1b544e90-7659-4BD9-9e51-2497c146af15

    and repost in the windows forums OK 7

    Here is the vista forums

    Windows 7 forums on the link below

    http://answers.Microsoft.com/en-us/Windows/default.aspx#tab=2

    Answers by topic

  • How to delete raw data into information about the file? Is it still possible?

    How to delete raw data into information about the file? Is it still possible?

    Don't know what you're saying in post #2. Sorry, just an old geezer with a considerably weakened brain here.

    Regarding the original post, select the entire image (A Command on Mac, Ctrl-A in Windows), and then A (Ctrl A) to create a new document of the same exact size, then control V to paste the Clipboard command and finally to save the file under a new name and the format of your choice.

    You now have an identical file but without any EXIF info.

  • I ran CHKDSK, the report tells me I have problems with the file system, usn journal. ___

    I ran CHKDSK, the report tells me that I have problems with the sys file. I ran CHKDSK/F, it is said it fixed the problem but I ran CHKDSK again and it shows that the same listed the issues.

    Describe how you run chkdsk.

    That is what the report said: you have problems with the sys file?

    CHKDSK examines the disk space and use of the disk for the table of allocation of files (FAT) and NTFS file systems. CHKDSK provides information specific to each file system in a situation report. The report shows the errors found in the file system. If you run chkdsk without the /f on an active partition command line option, it can report errors because it cannot lock the drive. You should use chkdsk occasionally on each disk to check for errors.

    If you run chkdsk from a command prompt while Windows is running, it can report errors or it may not report errors - and it may report different
    Errors each time you run.  If this is the case, it could just be the way you run chkdsk.

    Here's how Microsoft explains this observation:

    "... CHKDSK may report that the disc is damaged, even when there is no
    current real corruption. This can happen if NTFS happens to modify
    areas of the disc on behalf of some programme activities that CHKDSK is
    review at the same time. To check a volume correctly, the volume
    must be in a static state, and the only way to ensure that the State is
    to lock the volume. CHKDSK only locks the volume when /F or/r (which
    involves the 'F') is specified. For example, you may need to run CHKDSK more than
    time so that it can complete all the steps in read-only mode. »

    If you run chkdsk from a command prompt, you are not the necessary static state and you can encounter errors "when no real corruption is present. This is how it works when you use this way.  Any changes made to a NTFS file system modifies the USN Journal.  If you are not in a static state, your USN change Journal probably all the time, so what you see (says something like that) can be quite normal.

    Two ways to ensure that you are in a static state is to run chkdsk from the Recovery Console or to schedule a chkdsk to run the next time that the system
    Restart by answering Yes to the question:

    Would you want to check this volume to be the next time the system restarts?

    If chkdsk reports errors when running in a static state, the errors should be investigated, resolved or explained.  This may take several
    chkdsk runs all of the issues and some problems cannot be resolved by chkdsk.

    If chkdsk runs the next time the system is restarted, the activity and the result will be displayed in the application event log.  Look in the Application log for
    Winlogon events and a source have the date and the duration nearby time chkdsk.

    It is in fact a chkdsk additional reading if you want to learn about it and it will explain everything you see and why your expectations exceed reality.

    Please vote my posts as helpful so I can get a lot of points. I'm saving for a pony!

  • The file system on the disk structure is corrupted and unusable. Please run chkdsk on the volume D: utility.

    However, chkdsk finds no problems, so what happens?

    Checking file system on D:
    The type of the file system is NTFS.
    Volume label is A RAID.

    One of your disks needs to be checked for consistency. You
    may cancel the disk check, but it is strongly recommended
    that you continue.
    Windows will now check the disk.
    Cleaning of minor inconsistencies on the drive.
    Cleaning 9 unused entries index $SII of file 0x9.
    Cleaning 9 unused entries index $SDH of file 0x9.
    Cleaning unused 9 security descriptors.
    CHKDSK checks Usn Journal...
    Audit of the USN Journal is complete.
    CHKDSK is verifying file data (stage 4 of 5)...
    File data verification completed.
    CHKDSK is verifying free space (step 5 of 5)...
    Free space verification is complete.

    244196000 KB total disk space.
    126454172 KB in 238052 files.
    109736 Ko 22501 index.
    0 KB in bad sectors.
    868124 KB in use by the system.
    65536 KB occupied by the log file.
    116763968 KB available on disk.

    4 096 bytes in each allocation unit.
    61049000 total allocation on the drive units.
    29190992 allocation units available on disk.

    He is so little known about your configuration - because the forums MS Answers do not ask for information, when a new question is asked.

    If you run some kind of RAID configuration, you might do better if you describe your RAID configuration and after the actual event that you see in the event log (is it event ID 55?).  Then maybe you will get some ideas of the Microsoft Support engineer who might actually work.

    You see just this event in the paper at random times or is it when you try to run a specific operation and if yes, what operation triggers the event?  Here is an article of MS to help get you started, but if you use Google to search for the error message, you can find more ideas:

    http://support.Microsoft.com/kb/246026

    If sfc/scannow solves your problems, I'll send you (or your charitable organization preferred) US $100.

    Here's how to publish events to the event to display the log files:

    If you double-click on an event, it will open a window of properties with more information.  On the right are black up and down arrow keys to scroll through the open events. The third button that looks like two overlapping pages is used to copy the details of the event in your Windows Clipboard.

    When you find an interesting event that occurred at the time of your question, click on the third button at the top and arrows to copy the details and then you can paste the details (right click, paste or CTRL-V) the text in detail here for analysis.  Remove all personal information from your information after you paste If you are forced to do so.

    If you paste an event, it will look something like this annoying system startup event:

    Event type: Information
    Event source: Service Control Manager
    Event category: no
    Event ID: 7035
    Date: 14/07/2010
    Time: 17:54:18
    User: Jose
    Computer: computer

    Description:
    The Remote Access Connection Manager service was sent successfully a starting control.

    To get a fresh start on any log of the event viewer, you can choose to clear the log (the log backup is available), and then reproduce your problem, then just look at the events around your show and troubleshoot events that are happening when you have your question.

    You can search for events on the World Wide Web and get ideas.  It's where people events they see and then to the top of their questions, ideas and solutions:

    http://www.EventID.NET/

    If you find your event in the discussion, the first idea or discussion does not necessarily mean it is the "answer" to your situation, so read through all the ideas to find the one that sounds more like your situation.

  • Access to the file system

    My script needs a Framemaker template file to create a new file. I did work hard-code the path to the template in the script:

    sFilename = "C:\\Users\\gisteppen\\Desktop\\fm change bars\\dev\\changes-template.fm";

    I want to make is easy to distribute. I want the script to search for this template file in any directory the script is in, but I find that it won't work if I just put the model name without the path like this:

    sFilename = "changes - template.fm";

    Is there a way to get the current directory where the script is the file system? Then I could build the path absolute Fm seems to need.

    Or maybe there's a better way to go about this?

    Thank you

    Mark

    You can do something like the code below, which detects a settings file with the same name as the script, but with a .cfg extension.

        // Make a File object for the settings XML file.
        var settingsFile = new File($.fileName.replace (/\.jsx$/i , ".cfg"));
        if (settingsFile.exists === false) {
            $.writeln ("Settings file does not exist: " + settingsFile.fsName);
        }
    

    The property of. Filename $ gives you the path to the script running. Here, I am replacing the .jsx by .cfg extension.

    In your case, you could use something like this:

        // Make a File object for the template.
        var template = new File($.fileName.replace (/[^\/]+$/, "changes-template.fm"));
        if (template.exists === false) {
            $.writeln ("Template does not exist: " + template.fsName);
        }
    

    Important: make sure that you save the script before using this code. $. Filename returns (Script #) from a script without a title.

    -Rick

  • Open a file from the file system based on the selection

    Hi Experts,

    I need your expert advice on opening a file (in a new window) on the basis
    the user's selection.

    I have a following database table that is web_doc which contains the file names and the description.

    PK_ID - FILE_NAME - FILE_DESC
    ------- -------------------------------------------------------------------------------
    1 table to create a client address - a.txt -.
    2 - b.txt - client Create table of contents
    3 - activity table of sperm to create c.txt -.
    4 - d.txt - Create embryo activity table

    What I want: When the user clicks on one of highest rank on the screen of the apex, the file must
    Open in a new window. The files are stored in the file system is to be

    Thanks in advance.

    Published by: user8609115 on January 27, 2010 09:18

    Dip,

    Try something like:

    <a href="/i/your_folder_name/your_file_name.doc">Get File</a>
    

    Kind regards
    Dan

    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/
    Dip,

    Try something like:

Maybe you are looking for