Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'm sure the Mac::PropertyList is slower than hooking into Foundation, but the times you see surprise me. I tried it with my own Album.xml (860kb) and it parsed it in 0.2 seconds. I'm curious hwo long the timed tests (in t/time.t) take for you.

    Also, what else is in the file besides the plist stuff? The only thing I've ever seen above <plist> is the XML declaration, and nothing below </plist>

    A future release of Mac::PropertyList will have the hooks to the foundation stuff so it's faster if that stuff is there. Mind if I steal a bit of code? :)
    • Brian - i just ran t/time.t and I see this:

      t/time.........Elapsed time is 0.021996
      t/time.........ok

      Pretty consistently at that value.
      I also ran the sample through Devel::DProf and her's what I see:

      macbox:~/tmp thoellri$ perl -d:DProf plist2.pl
      using Mac::PropertyList = 32.427314
      macbox:~/tmp thoellri$ dprofpp
      Total Elapsed Time = 31.58248 Seconds
      User+System Time = 31.01248 Seconds
      Exclusive Times
      %Time ExclSec CumulS #Calls sec/call Csec/c Name
      61.6 19.12 31.044 11456 0.0017 0.0027 Ma
      • Okay, good to know. I'll fix up the parser.

        The newest version is a fix by Mike Ciul that made things a little bit faster for very large files. It might help.

        What I really need to do is fix up Mike's enhancement so it can deal with files without reading them all in at once. That should be easy, but it's in line after all the other easy things. :)

        After that, I need to add the Foundation stuff (or something similar) so the Mac users don't have to suffer the portability penalty.

        Thanks again :)