How do I improve performance?

My macbook is running very slowly. I also suspect it may be infected with some sort of malware or other internet viruses.

Checked to see how much space is available ??
Click your Apple menu  top left in your screen. From the drop down menu click About This Mac > More Info > Storage
Make sure there's at least 15% free disk space. Not enough free disk space can slow the drive down.
Check the startup disk lately?
Launch Disk Utility located in HD > Applications > Utillities
Select the startup disk on the left then select the First Aid tab.
Click:  Verify Disk  (not Verify Disk Permissions)
If DU reports errors, start up from your Mac install disc to make repairs.
Instructions here >  Mac OS X 10.6: Reinstalling Mac OS X
Other suggestions here >  Mac troubleshooting: What to do when your computer is too slow | Macworld

Similar Messages

  • How do I improve performance while doing pull, push and delete from Azure Storage Queue

           
    Hi,
    I am working on a distributed application with Azure Storage Queue for message queuing. queue will be used by multiple clients across the clock and thus it is expected that it would be heavily loaded most on the time in usage. business case is typical as in
    it pulls message from queue, process the message then deletes the message from queue. this module also sends back a notification to user indicating process is complete. functions/modules work fine as in they meet the logical requirement. pretty typical queue
    scenario.
    Now, coming to the problem statement. since it is envisaged that the queue would be heavily loaded most of the time, I am pushing towards to speed up processing of the overall message lifetime. the faster I can clear messages, the better overall experience
    it would be for everyone, system and users.
    To improve on performance I did multiple cycles for performance profiling and then improving on the identified "HOT" path/function.
    It all came down to a point where only the Azure Queue pull and delete are the only two most time consuming calls outside. I can further improve on pull, which i did by batch pulling 32 message at a time (which is the max message count i can pull from Azure
    queue at once at the time of writing this question.), this returned me a favor as in by reducing processing time to a big margin. all good till this as well.
    i am processing these messages in parallel so as to improve on overall performance.
    pseudo code:
    //AzureQueue Class is encapsulating calls to Azure Storage Queue.
    //assume nothing fancy inside, vanila calls to queue for pull/push/delete
    var batchMessages = AzureQueue.Pull(32); Parallel.ForEach(batchMessages, bMessage =>
    //DoSomething does some background processing;
    try{DoSomething(bMessage);}
    catch()
    //Log exception
    AzureQueue.Delete(bMessage);
    With this change now, profiling results show that up-to 90% of time is only taken by the Azure Message delete calls. As it is good to delete message as soon as processing is done, i remove it just after "DoSomething" is finished.
    what i need now is suggestions on how to further improve performance of this function when 90% of the time is being eaten up by the Azure Queue Delete call itself? is there a better faster way to perform delete/bulk delete etc?
    with the implementation mentioned here, i get speed of close to 25 messages/sec. Right now Azure queue delete calls are choking application performance. so is there any hope to push it further.
    Does it also makes difference in performance which queue delete call am making? as of now queue has overloaded method for deleting message, one which except message object and another which accepts message identifier and pop receipt. i am using the later
    one here with message identifier nad pop receipt to delete message from queue.
    Let me know if you need any additional information or any clarification in question.
    Inputs/suggestions are welcome.
    Many thanks.

    The first thing that came to mind was to use a parallel delete at the same time you run the work in DoSomething.  If DoSomething fails, add the message back into the queue.  This won't work for every application, and work that was in the queue
    near the head could be pushed back to the tail, so you'd have to think about how that may effect your workload.
    Or, make a threadpool queued delete after the work was successful.  Fire and forget.  However, if you're loading the processing at 25/sec, and 90% of time sits on the delete, you'd quickly accumulate delete calls for the threadpool until you'd
    never catch up.  At 70-80% duty cycle this may work, but the closer you get to always being busy could make this dangerous.
    I wonder if calling the delete REST API yourself may offer any improvements.  If you find the delete sets up a TCP connection each time, this may be all you need.  Try to keep the connection open, or see if the REST API can delete more at a time
    than the SDK API can.
    Or, if you have the funds, just have more VM instances doing the work in parallel, so the first machine handles 25/sec, the second at 25/sec also - and you just live with the slow delete.  If that's still not good enough, add more instances.
    Darin R.

  • How can I improve performance when scopes are open?

    How can I improve performance when scopes are open?
    When Color correcting, performance severely lags, stalls, freezes!
    Nothing to complex...simple 3 way color corrector, occasional curves filters.
    I am constantly waiting for the timeline to update as I move around....sometimes as long as a minute or so.
    I'm on brand new 2.7 Ghz 12-Core MacPro with 64 GB of RAM
    Thanks in advance.
    Jay

    http://forums.adobe.com/thread/1369260?tstart=0

  • How can we improve performance while selection production orders from resb

    Dear all,
    there is a performance issue in a report which compares sales order and production order.
    Below is the code, in this while reading production order data from resb with the below select statement.
    can any body tell me how can we improve the performance? should we use indexing, if yes how to use indexing.
    *read sales order data
      SELECT vbeln posnr arktx zz_cl zz_qty
      INTO (itab-vbeln, itab-sposnr, itab-arktx, itab-zz_cl, itab-zz_qty)
      FROM vbap
      WHERE vbeln  = p_vbeln
      AND   uepos  = p_posnr.
        itab-so_qty = itab-zz_cl * itab-zz_qty / 1000.
        CONCATENATE itab-vbeln itab-sposnr
           INTO itab-document SEPARATED BY '/'.
        CLEAR total_pro.
    **read production order data*
        SELECT aufnr posnr roms1 roanz
        INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
        FROM resb
        WHERE kdauf  = p_vbeln
        AND   ablad  = itab-sposnr+2.

    Himanshu,
    Put a break point before these two select statements and execute in the production.This way you will come to know which select statement is taking much time to get executed.
    In both the select statements the where clause is not having the primary keys.
    Coming to the point of selecting the data from vbap do check the SAP note no:-185530 accordigly modify the select statement.
    As far as the table RESB is concerened here also the where clause doesn't have the primary keys.Do check the SAP Note No:-187906.
    I guess not using primary keys is maring the performance.
    K.Kiran.

  • How can I improve performance for BC4J/JSP-application

    Hi,
    I have developed a JSP-Applikcation with the master-detail views. This Application has been implemented
    as SSO enabled web portlet into portal. Whenn I click on a row retrieved from the master view (Master.jsp), it take 15 seconds
    until the associated data in detail view will be displayed on the other window(Detail.jsp). The master table has about 2500 records and detail table about 7000. (Other case: it takes 2 seconds for 162 rows (master) and 228 rows (detail) respectively)
    In Master.jsp I set rangesize = "10" to reduce data loading time.
    ======================== master.jsp =================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="10">
    <a href="detail.jsp?RowKeyValue=<jbo:ShowValue datasource="dsMaster" dataitem="RowKey"/>">
    Here Click
    </a>
    ==================================================================
    Because all records from master view have firstly to be retrieved to locate right row, I set rangesize="-1" in detail.jsp. Consequently this leads to a lower performance.
    When rangesize="20" sets instead rangesize="-1", The performance is good, but the wanted Data from detail view are not displayed if the records of master view cliked on ist not in this range.
    ======================== detail.jsp ======================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="-1">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    ======================================================================
    Is my programming logic not to be suited for the high performance?
    How can I improve the performance, if it is so?
    Many thanks for your help.
    regards,
    Yoo

    http://forums.adobe.com/thread/1369260?tstart=0

  • How do I improve performance with exchange

    My corporate email is on an exchange 2010 server. Mail.app works with the server but there are a number of performance problems when sending and receiving, which are also well documented in other discussion threads. I have tried every suggested configuration but performance remains extremely poor, especially when compared to my personal IMAP accounts, and the performance I was used to in Outlook 2011 under Mountain Lion.
    Looking through my logs I see multiple entries of:
    03/12/2013 14:37:55.007 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:55.008 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:56.456 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:56.456 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:57.989 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:58.143 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:37:59.677 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    03/12/2013 14:38:00.930 Mail[5018]: CFNetwork SSLHandshake failed (-9800)
    I have installed and trusted the certificates for our exchange server and can browse to the owa front end with no certificate warnings.
    Interestingly, I don't have the same problem with reminders or calendar which are connected to the same exchange server.
    Does anyone have any ideas how to overcome this problem?

    Some additional information...
    I fired up wireshark to take a look. For all communications to our Exchange server (Mail, Calendar, Notes...) the SSL negotation includes a downgrade to TLS v1
    I notice that Mavericks CoreFoundation Networks defaults to TLS v1.2 and that BEAST mitigation leads to some problems example: https://trac.adium.im/ticket/16550
    Exchange Server 2010 is TLS v1.0 only http://support.microsoft.com/kb/2709167
    I'll do some more Wireshark investigation.

  • How can I improve performance over a Branch Office IPsec vpn tunnel between and SA540 and an SA520

    Hello,
    I just deployed one Cisco SA540 and three SA520s.
    The SA540 is at the Main Site.
    The three SA520s are the the spoke sites.
    Main Site:
    Downstream Speed: 32 Mbps
    Upstream Speed: 9.4 Mbps
    Spoke Site#1:
    Downstream Speed: 3.6 Mbps
    Upstream Speed: 7.2 Mbps (yes, the US is faster than the DS at the time the speed test was taken).
    The SA tunnels are "Established"
    I see packets being tranmsitted and received.
    Pinging across the tunnel has an average speed of 32 ms (which is good).
    DNS resolves names to ip addresses flawlessly and quickly across the Inter-network.
    But it takes from 10 to 15 minutes to log on to the domain from the Spoke Site#1 to the Main Site across the vpn tunnel.
    It takes about 15 minutes to print across the vpn tunnel.
    The remedy this, we have implemented Terminal Services across the Internet.
    Printing takes about 1 minute over the Terminal Service Connection, while it takes about 15 minutes over the VPN.
    Logging on to the network takes about 10 minutes over the vpn tunnel.
    Using an LOB application takes about 2 minutes per transaction across the vpn tunnel; it takes seconds using Terminal Services.
    I have used ASAs before in other implementation without any issues at all.
    I am wondering if I replaced the SAs with ASAs, that they may fix my problem.
    I wanted to go Small Business Pro, to take advantage of the promotions and because I am a Select Certified Partner, but from my experience, these SA vpn tunnels are unuseable.
    I opened a case with Small Business Support on Friday evening, but they couldnt even figure out how to rename an IKE Policy Name (I figured out that you had to delete the IKE Policy; you cannot rename them once they are created).
    Maybe the night weekend shift has a skeleton crew, and the best engineers are available at that time or something....i dont know.
    I just know that my experience with the Cisco TAC has been great for the last 10 years.
    My short experience with the Cisco Small Business Support Center has not been as great at all.
    Bottom Line:
    I am going to open another case with the Day Shift tomorrow and see if they can find a way to speed things up.
    Now this is not just happening between the Main Site and Spoke Site #1 above. It is also happeninng between the Main Site and Spoke #2 (I think Spoke#2 has a Download Speed of about 3Mbps and and Upload Speed of about 0.5 Mbps.
    Please help.
    I would hate to dismiss SA5xx series without making sure it is not just a simple configuration setting.

    Hi Anthony,
    I agree!.  My partner wants to just replace the SA5xxs with ASAs, as we have never had problems with ASA vpn performance.
    But I want to know WHY this is happening too.
    I will definitely run a sniffer trace to see what is happening.
    Here are some other things I have learned from the Cisco Small Business Support Center (except for Item 1 which I learned from you!)
    1.  Upgrade the SA540 at the Main Site to 2.1.45.
    2a. For cable connections, use the standard MTU of 1500 bytes.
    2.b For DSL, use the following command to determine the largets MTU that will be sent without packet fragmentation:
    ping -f -l packetsize
    Perform the items below to see if this increases performance:
    I was told by the Cisco Small Business Support Center that setting up a Manual Policy is not recommended; I am not sure why they stated this.
    3a. Lower the IKE encryption algorithm from "AES-128" to DES.
    3b. Lower the IKE authentication algorithm to MD5
    3c. Also do the above for the VPN Policy
    Any input is welcome!

  • How can I improve performance of macbook air

    My MacBook Air seems ti be running slow:  Slow to start up, slow to start new programs, slow when running multiple tasks at the same time.
    Here's how my machine is set up:
    Processor  1.86 GHz Intel Core 2 Duo
    Memory  2 GB 1067 MHz DDR3
    OSX 10.8.2
    Any suggestions or is this what i can expect?
    Thanks for any help.
    -PR

    Things You Can Do To Resolve Slow Downs
    If your computer seems to be running slower here are some things you can do:
    Start with a visit to: OS X Maintenance - MacAttorney.
    Boot into Safe Mode then repair your hard drive and permissions:
    Repair the Hard Drive and Permissions Pre-Lion
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Repair the Hard Drive - Lion
    Boot from your Lion Recovery HD. When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Restart your computer normally and see if this has helped any. Next do some maintenance:
    Suggestions for OS X Maintenance
    For situations Disk Utility cannot handle the best third-party utility is Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.
    I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Data Backup
      3. Deja Vu
      4. SuperDuper!
      5. SyncTwoFolders
      6. Synk Pro
      7. Synk Standard
      8. Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.
    Additional Hints
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Add more RAM. If your computer has less than 2 GBs of RAM and you are using OS X Leopard or later, then you can do with more RAM. Snow Leopard and Lion work much better with 4 GBs of RAM than their system minimums. The more concurrent applications you tend to use the more RAM you should have.
    Always maintain at least 15 GBs or 10% of your hard drive's capacity as free space, whichever is greater. OS X is frequently accessing your hard drive, so providing adequate free space will keep things from slowing down.
    Check for applications that may be hogging the CPU:
    Open Activity Monitor in the Utilities folder.  Select All Processes from the Processes dropdown menu.  Click twice on the CPU% column header to display in descending order.  If you find a process using a large amount of CPU time, then select the process and click on the Quit icon in the toolbar.  Click on the Force Quit button to kill the process.  See if that helps.  Be sure to note the name of the runaway process so you can track down the cause of the problem.
    Often this problem occurs because of a corrupted cache or preferences file or an attempt to write to a corrupted log file.

  • Join taking lot of time.? How can we improve performance?

    Hi,
    I am having tow sources SRC_A and SRC_B.
    I am applying full outer join between the 2 sources.
    Here SRC_A contains 2 fields. It contains 8 Crore records.
    and SRC_B contains 2 fields. It contains 8 Crore records.
    I am having temp table space is of 500 GB. and Undo Table space is of 250GB.
    I am getting Roll back segment error.
    It didn't insert a single recornd in the target table.
    Could anyone please suggest me?
    Am I missing anything? What all things I can do to improve the performance.
    Thank you,
    Regards,
    Gowtham Sen.

    you need to provide your oracle version, ora-xxxxx error code, formatted([ pre ] tags) source code and explain plan output at least to get more help here.
    alter session set statistics_level = all ;
    explain plan set statement_id = 'demo' into plan_table for SELECT ..
    SELECT PLAN_TABLE_OUTPUT FROM TABLE(dbms_xplan.display_cursor(null, null, 'allstats last'));here are some examples.
    http://psoug.org/reference/explain_plan.html
    http://coskan.wordpress.com/2007/03/04/viewing-explain-plan/
    Also autotrace option or sql trace+tkprof will provide the informations needed.
    http://www.bhatipoglu.com/entry/17/oracle-performance-analysis-tracing-and-performance-evaluation
    If this is a snapshot too old error please mention undo management settings.

  • Utl_raw.bit_and - how can I improve performance of this query?

    Hi all
    Hugely grateful for any light anyone can shed.
    I need to do bit AND operations on 128 bit numbers and I'm stuck in Oracle 10g.
    10g provides a very nice bitand() function that can be applied to numbers but it only works up to 64 bit numbers (actually only 62 I think because it needs a couple of bits)
    So I've been looking at using the utl_raw.bit_and function. It works very well, except that I'm encountering a massive performance hit, which hopefully is in the way I'm using it, rather than intrinsic to the speed at which utl_raw.bit_and itself performs..
    With numbers, I do a query like this:
    select count(1) from offer_a where bitand(bit_column, 51432) = 51432
    With utl_raw.bit_and (and 16-byte RAW column), I am passing in a hex value (may not be the best thing? Would passing in binary be better?) and doing my query like this:
    select count(1) from offer_a where utl_raw.bit_and(bit_column,hextoraw('00000000000000000020008000002ca1')) = hextoraw('00000000000000000020008000002ca1');
    One million rows using bitand takes about a second, using utl_raw.bit_and like this takes 25 seconds or so!!! Hopefully it's something in the way I'm calling it, and there's a faster way?
    Thank you!
    Jake

    Hmm.. Actually it may not be that simple.
    I had created an index on the number column that oracle seems to consistently use if I do a query like:
    select count(1) from scott.offer_b where
    current_price >= 0 and
    bitand(current_price, 9008574719100165) = 9008574719100165
    (without the >= oracle seems to do a full table scan. The reason I created the index is that there's other columns in the data table, making larger blocks. I figured that an index, even though most of needs to be scanned, would be faster because I can cram many more rows into each block..?).
    But if I drop the index on the number column, it takes about 12 secs/1m rows, in other words about half the time of the utl_raw.bit_and().
    So it's possible that bitand on 64 bits takes about half the time of utl_raw.bit_and on 128 bits, which is very reasonable..
    So maybe the real problem I have is why oracle is not using the equivalent index that I placed on the RAW column when I do:
    select count(1) from scott.offer_b where
    hex_bit_sig >= '00000000000000000020008000002ca1' and
    utl_raw.bit_and(hex_bit_sig,'00000000000000000020008000002ca1') = '00000000000000000020008000002ca1';
    (By the way I realized that I don't need to use the hextoraw - seems like just putting a hex number in '' is the right way to specify a raw anyway?)
    So yes, I think that's the real problem - how can I get oracle to use the index I created on the RAW value

  • How can i improve performance of a horizontal parallax on an mobile device?

    I've created a Horizontal Parallax website using Adobe Muse, and it works perfectly on a desktop machine, but as you use it on a mobile device such as an iPad, the performance becomes jerky and jumpy.
    I added navigation buttons to jump to set keypoints, which again, work smoothly on a desktop, but then jump on a mobile device.
    Is there any way to prevent this jumpy motion and make it more smooth?
    Thanks in advance!

    Its just scrolling images. A Horizontal Parallax, (the pages are placed in the project vertically, as suggested by adobe).   There are no animated images, no videos either.  All are just transparent PNGs with scroll effect attached.
    It seems jumpy if you use it on the ipad, both through scrolling, but even worse if you use the navigation i've implemented, which is supposed to scroll to the anchor point.

  • How can I improve performance (image searching)

    Hello,
    My program makes many calls to a method that compares two images. It does this by using nested for-loops (one for x-pixel and one for y-pixel) to search through a BufferedImage image and use getRGB() to compare pixel-by-pixel to see if the two images are the same.
    I've added a little bit of "optimisation" that first compares the central 5-pixles (the 5 pixels in an "X" shape in the middle of each image), and will only continue to search pixel-by-pixel if those are shown to be the same.
    Of course, both searches (the optimisation-pre-search and the pixel-by-pixel search) will quit out of the loops and return false as soon as one non-matching pixel is found.
    The problem is that it has to do this millions of times. For every single pixel in the source image, it has to go through one-by-one and compare, starting with the "optimised" speedy-compare and then moving on.

    Try this:
    public static boolean areImagesIdentical(File file1, File file2) throws IOException {
              // Safe to do this?
              if(file1.getAbsolutePath().equals(file2.getAbsolutePath())) {
                   System.out.println("files are same - same path");
                   return true;
              if(file1.length() != file2.length()) {
                   System.out.println("files are different, different file size");
                   return false;
              BufferedImage image1 = ImageIO.read(file1);
              BufferedImage image2 = ImageIO.read(file2);
              if(image1.getHeight() != image2.getHeight() || image1.getWidth() != image2.getWidth()) {
                   System.out.println("files are different, different height or width");
                   return false;
              // Take 10 pixels from anywhere in each image
              for(int i=0; i<10; i++) {
                   int x = (int) (Math.random() * image1.getWidth());
                   int y = (int) (Math.random() * image1.getHeight());
                   if(image1.getRGB(x, y) != image2.getRGB(x, y)) {
                        return false;
              int[] image1AllRGBs = image1.getRGB(0, 0, image1.getWidth(), image1.getHeight(), null, 0, image1.getWidth());
              int[] image2AllRGBs = image2.getRGB(0, 0, image2.getWidth(), image2.getHeight(), null, 0, image2.getWidth());
              return Arrays.equals(image1AllRGBs, image2AllRGBs);
         }

  • How can I improve performance on my iPad 1. I am having problems with apps closing unexpectedly and also with slow response.

    My iPad 1 has become almost unusable apps crash without warning and the response time is very slow.

    1. Close all inactive apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down for about 10 seconds until you see the Apple Logo.

  • How to preload sound into memory to improve performance?

    Hello all
    I have an application where it needs to play 4 different short wave files on some events. The wave files are small (less then 1 sec each) so they can be preloaded into memory. But I don't really know how to do that.. This is my current code... Performance is really important here, so the faster users can hear the sounds, the better...
    import java.io.*;
    import javax.sound.sampled.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class PlaySound implements ActionListener
         private Clip clip = null;
         public void play(String name)
              if (clip != null)
                   clip.stop();
                   clip = null;
              loadClip(name);
              clip.start();
         private void loadClip(String fnm)
              try
                   AudioInputStream stream = AudioSystem.getAudioInputStream(new File(fnm + ".wav"));
                   AudioFormat format = stream.getFormat();
                   DataLine.Info info = new DataLine.Info(Clip.class, format);
                   if (!AudioSystem.isLineSupported(info))
                        JOptionPane.showMessageDialog(null, "Unsupported sound line", "Warning!", JOptionPane.WARNING_MESSAGE);
                   else
                        clip = (Clip) AudioSystem.getLine(info);
                        clip.open(stream);
                        stream.close();
              catch (Exception e)
                   JOptionPane.showMessageDialog(null, "loadClip E: " + e.toString(), "Warning!", JOptionPane.WARNING_MESSAGE);
         public static void main(String[] args)
              play("a wav file name");
    }     I would appreciate it if someone can point out how I can preload them to improve performance... Thanks in advance!

    The message above should be:
    OMG, me dumb you smart Florian...
    Thank you for your suggestion... It's not the best OR anything close to what I thought it would be, it's certainly one way to do it and better then what I've got now...
    Thanks again Florian, I really appreciate it!!
    BTW, is there anything that would produce the sound faster then this?
    Message was edited by:
    BuggyVB

  • How to improve performance of MediaPlayer?

    I tried to use the MediaPlayer with a On2 VP6 flv movie.
    Showing a video with a resolution of 1024x768 works.
    Showing a video with a resolution of 1280x720 and a average bitrate of 1700 kb/s leads to a delay of the video signal behind the audio signal of a couple of seconds. VLC, Media Player Classic and a couple of other players have no problem with the video. Only the FX MediaPlayer shows a poor performance.
    Additionally mouse events in a second stage (the first stage is used for the video) are not processed in 2 of 3 cases. If the MediaPlayer is switched off, the mouse events work reliable.
    Does somebody know a solution for this problems?
    Cheers
    masim

    duplicate thread..
    How to improve performance of attached query

Maybe you are looking for