Hi,Recent changes in PetitParser have caused parsing to slow down by a factor of 15-20. Here is an example run on freshly downloaded Moose image:[|string allStyles text|string := (PharoFilesOpener default changesFileOrNil contents copyFrom: 1 to: 60000).text := string asText.allStyles := {'Announcement' -> TextColor green.'Collections' -> TextColor blue.'File' -> TextColor blue.'Metacello' -> TextColor red.'Monticello' -> TextColor magenta.'Morphic' -> TextColor orange.'Mooose' -> TextColor green.'FAMIX' -> TextColor green.'Roassal' -> TextColor green.}.allStyles do: [ :assoc | ((assoc key asParser, #newline asParser negate star) matchingRangesIn: string) do: [:aRange | text addAttribute: (assoc value) from: aRange first to: aRange last] ].text] timeToRun ==> 15 sec==============now do this:Gofer new url: 'http://smalltalkhub.com/mc/Moose/PetitParser/main'; version:'PetitParser-DiegoLont.233'; load.
and run the example again.timeToRun ===> 2 secSo, we need to have a look at what is added recently in PetitParser that is making it slow down quite significantly because the for the larger systems, this can be enormous.
regards,UsmanP.S: Tests run on OS X 10.9.4, 2.3 GHz, 8 GB RAM, HD SSD.
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev