Worked on the pygtk backend: Implemented a fast generate() function