A counter-intuitive optimisation result... can anybody shed some light?

Hi,
I've been trying to make an asynchronouse PNG encoder as I am encoding some big and complex images that tie up even a good machine for several seconds. So, I thought, it would be easy to split out the processing of the ByteArray into chunks and process a new chunk on each Event.ENTER_FRAME.
Well...
It was easy to implement (thanks Adobe for giving access to your source code!) but the results were counter-intuitive:
1. Encoding a PNG image entire: Approximately 1 seconds.
2. Encoding a PNG image in chunks of 100 lines: Approximately 1.5 seconds PER CHUNK and then FOUR or FIVE seconds to compress at the end!
When I tried this on AIR for Android, the results were even worse with the final ByteArray.compress() call taking more than FORTY seconds!
This is obviously barmy as it is taking a multiple of the total time to process everything _INCLUDING_ the .compress() call to simply process the .compress() call.
The ByteArray in Adobe's encoder is a temp variable encased in a single function where the ByteArray in my function is a class member that is populated at the start of the encode and then added to with each successive Event.ENTER_FRAME. That is the ONLY difference I can see at the moment (trust me, I didn't go messing with that code too much... it is strongly referencing the original). Is there any other reason people can see for the massive difference in performance for essentially the exact same lines of code?
Thanks,
G

Oops!
I found the cause - I'd not updated one of my loops, so instead of running from yFrom to yTo, it was running 0 to length every time. So I managed to build a 29.6MB PNG file from 1.6MB of content!
Anyway, done. Works nicely.
G

Similar Messages

  • Can anybody shed some light on this? Replacement iphone activation issue

    I'm on an orange france contract and recently had a faulty iphone 3g black 16gb replaced by apple.
    When I put my original sim into the new iphone and connect up to itunes 8 I get the following message:
    'The sim card inserted into this iphone does not appear to be supported'
    The iphone is runnning 2.1 firmware.
    The sim card worked perfectly in my old iphone 3g and works when put into other mobiles.
    I've had a replacement SIM card without any luck and have even tried with another brand new
    unactivated iphone. When i put the sim card in an already activated iphone it works fine. I've tried
    restoring the firmware and tried activating it on other pc's and macs.
    Does anybody have any ideas? Both orange and apple are completely stumped.

    MonkeyPuzzle I have exactly the same issue but with an O2 (Apple's Carrier in UK) sim and replacement iphone 3G phone. Neither O2 or Apple can understand what is the cause. I have had three sim cards, changed tarif and now have a second iphone 3G from Apple which I've purchased from them as a loan to establish if the previous replacement has a hardware issue. Unfortunately I am experiencing the same issue with the second phone. I will keep pressing Apple and O2 for a solution although am beginning to feel this is a wider issue. Please would you post any updates you get from Orange FR and Apple

  • Can anybody shed some light on why there are no battery operated airprint printers?

    I have been waiting for Airprint on a battery operated printer since the Airprint technology came available, but for some reason no one makes one.  HP makes great battery operated printers but for some reason no Airprint capability.  My only guess is that these printer manufacturers are being lobbied by other tablet makers no to include Airprint as it would make their tablets a better option.  But with the market share that iPad commands I can see this as makeing any sense.  Any ideas? The applications for this seem endless.  How can we that want this option, effectively express this to manufacturers.  I am supprised Apple hasn't come up with a solution for this!

    That may be the reason, I did not think of that.  Do you think that the power required for the AirPrint is much more than a Bluetooth connection?  Surely technology these days would have a cure for that issue.  We currently use an HP Officejet 100 and it has plenty of battery life (using Bluetooth). But it's not compatible with the iPad so stuck using a small laptop to take care of the printing jobs. I have all the apps in place on the ipad to do away with the laptop if only I could get an AirPrint enabled portable printer to handle the physical paper requirements of our operation.

  • I have lost my photos/videos when i imported from my ipad 2 to my new imac latest version and it's not reading the files.  I have downloaded iMac library manager and can see them. can someone shed some light please ?

    i have lost my photos/videos when i imported from my ipad 2 to my new imac latest version OS X 10.8.4
    and it's not reading the files.  I have downloaded iMac library manager and can see them.  when i go back into iphoto i'm getting the following message :
    Do you want to switch the current iPhoto Library from “iPhoto Library.photolibrary” to “iPhoto Library.photolibrary” and relaunch iPhoto?
    I don't know what to do - please help !!!!
    can someone shed some light please ?

    So it appears you have only one library on the hard drive. Apply the two fixes below in order as needed to that library:
    Fix #1
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - run Option #4 to rebuild the database.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button and select the library you want to add in the selection window..
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.

  • Woke up to my iPhone 4 being completely blank. I've tried restarting and resetting it as well as charging it and plugging into my computer. Can anyone shed some light as to what may be wrong or how to fix it? Thanks

    Woke up to my iPhone 4 being completely blank. I've tried restarting and resetting it as well as charging it and plugging into my computer. Can anyone shed some light as to what may be wrong or how to fix it? Thanks

    Hello there, Kyle.Kuz.
    The following Knowledge Base article that provides some helpful pointers to help resolve your issue is:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Specifically:
    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIsand corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 15 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen . Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • So I  downloaded acrobat XI Standard from the Adobe website, when I go to install it, it says "Adobe XI Pro" at the top left corner. Can anyone shed some light on this for me? I have a volume license for XI Std. so I would like to use the Std. version.

    So I  downloaded acrobat XI Standard from the Adobe website, when I go to install it, it says "Adobe XI Pro" at the top left corner. Can anyone shed some light on this for me? I have a volume license for XI Std. so I would like to use the Std. version.

    login and download your software from the adobe volume licensing website, Customer resources | Adobe Buying Programs

  • Plugged in Apple TV, Apple symbol appears the a view of the rear of the box with a USB lead going to an iTunes symbol? Can anyone shed some light on this oh and it doesn't go past this point

    Plugged in Apple TV, Apple symbol appears the a view of the rear of the box with a USB lead going to an iTunes symbol? Can anyone shed some light on this oh and it doesn't go past this point

    You need to grab a micro usb cable and restore via iTunes
    http://support.apple.com/kb/HT4367?viewlocale=en_US&locale=en_US

  • When registering my iphone on itunes the message - the sim card insertedin this iphone does not appear to be supported - can anyone shed some light on this and tell me a way around this problem?

    when registering my iphone on itunes the message - the sim card insertedin this iphone does not appear to be supported - can anyone shed some light on this and tell me a way around this problem? the phone itself is an english phone and tried to register with a spanish sim and that message appeard, so i tried with my iphone sim which is english and the same message appeared!
    thanks

    Is the English sim from the original carrier as that is usually the message you get with a carrier locked phone.

  • HT1338 I am trying to register my Appliances and when I try to click on "Save" or "Submit" I am unable on my MacBook pro. I have tried different browsers yet still same problem.  Can anyone shed some light on this please.

    I am trying to register my Appliances and when I try to click on "Save" or "Submit" I am unable on my MacBook pro. I have tried different browsers yet still same problem.  Can anyone shed some light on this please.

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • Can anyone shed some light on the OS X icon "irregularity?"

    Had expected icons (Mail, Reminders, Calendar, etc.) would update to those of iOS 7 with the Mavericks update. They did not (for me)! Should I be doing something in order to see the updated icons in Applications and Dock? I noticed the icons changed in iCloud. This obviously is not a major issue just an observation. Can anyone shed some light on the OS X "irregularity?"

    When I upgraded to Mavericks... The Calendar and Notes icons were updated also.
    After the first reboot... they reverted back to the last generation.

  • Safari cannot open the specified address as OS X does not recognise the internet address starting with "aam". Please please can someone shed some light on this, its driving me MAD!!!

    when i try to download the software onto my mac, i receive a message saying that safari cannot open the specified address as OS X does not recognise the internet address starting with "aam". Please please can someone shed some light on this, its driving me MAD!!!

    Try and download the Desktop Application First before trying to install any other Adobe Product. The link for AAM is Safari looking for Desktop Application in your machine.
    Creative Cloud Help | Creative Cloud for desktop

  • Can anyoen shed some light?

    We are house parents at a high school dorm. We are wireless. I have a PB 17" running 10.3.9 with airport card, a brand new iMac with Airport Extreme card. I have tried to get my AE to connect to the wireless. The dorm is using Linksys WRT54G Router. It is in the attic of the house. I have a few questions.
    1. How can I get my AE to show a blinking green light, not amber? I am not savvy when it comes to wireless, I'm OK with the operating system
    2. How can I use my AE basestation to connect my Samsung laser printer so that the PB can print via the newtwork? I have it directly connect via USB to my iMac.
    3. I have been reading about port forwarding and assigning a static IP address. I have tried to launch Airport Adm. Uti. but since I am not using the AE basestation, I can't get to the configure window. I have tried connecting to http://192.168.1.1 but I can't connect to it.
    Can some shed some light? It would be greatly appreciated.
    Leo

    I have tried to get my AE to connect to the wireless.
    By "AE" do you mean AirPort Express? AirPort Extreme? What?
    2. How can I use my AE basestation to connect my Samsung laser printer so that the PB can print via the newtwork? I have it directly connect via USB to my iMac.
    You can connect your printer to the USB port on an AirPort Express or AirPort Extreme base station (AEBS). If it is compatible, you won't have a problem.
    I have tried to launch Airport Adm. Uti. but since I am not using the AE basestation, I can't get to the configure window.
    The AirPort Admin Utility works with AirPort Express or AEBS.

  • Can anyone shed some light on how to run window based application on mac air?  I must run Meta Trader 4 platform and MS Office.

    Hello,
    Can anyone please shed some light on how I can run MS Office and Meta Trader 4 platform on mac air.  I have been using Play on Mac and Wine for the past couple of weeks, but now suddenly it has stopped working, only crashing and giving me nightmares.  Is it juts best to install the latest Windows or Parallel?
    Regards Joe

    Meta Trader 4 is Windows only - Office is available for the Mac and Windows and are mostly compatible but given that you'll be doing online trading you may prefer the Windows version of Excel since there are financial spreadsheets with macros that only run on the Mac with some significant editing.
    You can install Windows 7 or 8 in BootCamp or any version of Windows usting virtualization. VMWare and Parallels are commercial programs and VirtualBox is open source. VB may be all you need. Whatever solution you choose, you'll need a commercial version of Windows (or get an OEM disc from NewEgg).

  • ITunes would not let me download music properly to my iPhone 4S, can someone shed some light on how I can fix it?

    I recently aquired an iPhone 4S, perfectly fine, around 2 months old. everything is working fine, and all apps and music are downloaded on to iTunes and WERE origionally on the iPhone. I started to then add more songs from iTunes, though the phone started refusing to download them and then the majority of my collection were then deleted. I did origionally think that this was simply because it could not find the location of all the music files, though upon searching i found that iTunes could indeed fine every single file, and that they all played perfectly well in iTunes. I did reset the phone and try simply re-installing the exact same storage pre-reset, though it simply made all of the songs like that. The iPhone (4S, 32GB, 4 month old) did have around 900 songs on it, all playing fine, though recently the number on iTunes is around 1240, though I don't want all the songs on.
    It is not that I am incapable of understanding the software of iTunes or of the iPhone, and I have had previous Apple products and also had interaction with various models (iPhone 5/5C/5S) and Android, so it this is where it stumps me on what the actual problem is.
    I have tried doing things like:
    Reseting the phone
    Making an individual playlist with all of the songs that I want on my phone
    Downloading Albums/Artists/songs/playlists individually (as to rule out if it is a specific artist/song/so on
    Downloading everything and then trying to get iTunes to download the actual song directly
    When updating/syncing my options on the Music tap on iTunes when the iPhone is plugged in, it registers on iTunes that the every song that I have ticked to be included in the sync has been synced, though upon checking my iPhone on the music app, the majority of the music will either have failed to sync or not be there, or be registered but unplayable (the title of the song is slightly transparent/grey). Then upon inspection of the [Settings>General>About>Songs], the count does not equate to that which is stated on iTunes.
    Any help will be appreciated as soon as possible, as my iPhone is used for music a significant amount of the time and the loss of around 700 songs off of my phone is quite significant.
    Bearing in mind that I am only 16 years old and have no actual IT knowledge in-depth of what is actually occuring other ethan what the consumers can see through such things as the settings and the location of files and their formats, I would be appreciative if any explanation wouldn't end up being too confusing, nor it being patronising (for instance, my ignorance of how to download music to iTunes)
    Thanks, atsdkg

    I have help for you!!!
    I had EXACTLY the same issue recently. What I had to do on my PC was go into the My computer section> click on my C drive> click on users> click on my username> go into music and then iTunes> Here you should see something that says iTunes Library. Make sure that iTunes is Closed and then take the iTune library and drag it onto Your desktop. This will create a copy on the desktop but iTunes will not see it. Reopen iTunes and you should see an option to scan for media. Once you do this iTunes should re-build your iTunes library and It should be able to sync. If it syncs fine and all your content is available go to the iTunes library that you dragged to the desktop and delete it as you should not have a new one. If this does not work absolutley do NOT delete the iTunes library that is on the desktop.
    Call Apple and let them know of the steps you have taken and request some help. This should fix it though!

Maybe you are looking for

  • Web Service + Complex Type + Java Studio Creator

    Hy all!! I am using Ubuntu 7.04 + Java Studio Creator 2 and i'm trying to use a webservice. This webservice uses a Complex Type and was made in PHP. I guarantee that this webservice is working with complex type because i've tested using a PHP client.

  • How to Download Photos from Camera to Computer

    Just got Photoshop and couldn't find steps to take camera photos and download to computer.  Would appreciate help on this.  Thanks.

  • [WebLogic 9.2] Please enable the DomainRuntimeMBean Server and the Edit MBean Server

    When trying to log-in into my Admin Console: A required MBean Server is disabled which prevents the proper operation of the Weblogic Administration Console. Please enable the DomainRuntimeMBean Server and the Edit MBean Server in this domain's config

  • CCD/SAF learned DNs are not able to call

    Hi, I have configured SAF in CUCMEs and configured a SAF Forwarder for CUCM. All CUCMEs are learning and advertising DNs and able to call each other. SAF Forwarder registered CUCM as client and in CUCM I can see learned DNs too. CUCMEs are learning C

  • Background using 2 screens

    I am using an external monitor with my laptop. In CS3 the image I work on is on the external monitor with a grey background. However the workspace is on the laptop and always has the underlying desktop visible. Is there some way to just have a clean