Is this a good place to come with code that runs into speed problems?

I am writing a program in perl6 to read the xml file from a Sony book reader, list the books, and move books into collections (the Sony software to do this will only work on windoz and not on wine).

I have a grammar that works with abbreviated test versions of the xml file, but it just hangs with the full version.

Since I have a line
my $parsed= sony_grammar(slurp "media.xml");

and the problem is in the parsing, I dont know how to insert trace statements to determine at what stage the problem is being generated.

In addition, there is a great deal in the Synopses about code points and backtracking and the like, which I dont quite understand. However, it seems to me that an intelligent use of these possibilities could increase the efficiency of the parsing, if only I knew how. For example, only three of the tags in the file are of interest, and within them three of the attributes. So how do I tell the regex engine to skip processing if the tag is not of interest?


Reply via email to