use the QgsVectorDataProvider.getFeatures API instead of the QgsVectorLayer.select() option