--- ezrssexportitem.php	2013-04-18 18:21:09.000000000 +0200
+++ ezrssexportitem.php	2013-05-13 13:25:04.000000000 +0200
@@ -250,39 +250,101 @@ class eZRSSExportItem extends eZPersiste
     */
     static function fetchNodeList( $rssSources, $objectListFilter )
     {
+        $startTime = microtime( true );
         // compose parameters for several subtrees
-        if( is_array( $rssSources ) && count( $rssSources ) )
+        if ( is_array( $rssSources ) && count( $rssSources ) )
         {
-            foreach( $rssSources as $rssSource )
+            //workaroud to get better performance with solr (work in progress)
+            $searchEngine = eZSearch::getEngine();
+            if ( get_class( $searchEngine ) == "eZSolr" )
             {
-                // Do not include subnodes
-                if ( !intval( $rssSource->Subnodes ) )
+                $params = array( );
+                foreach ( $rssSources as $rssSource )
                 {
-                    $depth = 1;
+                    // Do not include subnodes
+                    if ( !intval( $rssSource->Subnodes ) )
+                    {
+                        $depth = 1;
+                    }
+                    else // Fetch objects even from subnodes
+                    {
+                        $depth = 0;
+                    }
+                    $params[ 'SearchSubTreeArray' ][ ] = $rssSource->SourceNodeID;
+                    
+                    $params[ 'SearchContentClassID' ] = intval( $rssSource->ClassID );
+                    $params[ 'SearchDate' ] = "NOW-35DAY TO NOW";
                 }
-                else // Fetch objects even from subnodes
+                
+                $params[ 'SearchLimit' ] = $objectListFilter[ 'number_of_objects' ];
+                $safelimit = $params[ 'SearchLimit' ] + 15;
+                $params[ 'SortBy' ] = array( 'article/publish_date' => 'desc' );
+                $query = "";
+                $newresult = eZFunctionHandler::execute( 'ezfind', 'search', array( 
+                            'subtree_array' => $params[ 'SearchSubTreeArray' ],
+                            //'subtree_array' => 88,
+                            'class_id' => $params[ 'SearchContentClassID' ],
+                            'limit' => $safelimit,
+                            'offset' => 0,
+                            'sort_by' => $params[ 'SortBy' ],
+                            'filter' => array( 'article/publish_date:[' . $params[ 'SearchDate' ] . ']', 'article/article_no_newsticker:0', 'article/article_no_module:0' )
+                        ) );
+                $nodeids= array();
+                $nodeList = null;
+                foreach ( $newresult[ 'SearchResult' ] as $resultNode )
                 {
-                    $depth = 0;
+                    $tmpNode = eZContentObjectTreeNode::fetch( $resultNode->attribute( 'node_id' ) );
+                    if ( !in_array( $tmpNode->ContentObject->ID, $nodeids ) )
+                    {
+                        if ($resultNode->attribute('class_identifier') == 'article')
+                        {
+                            $nodeList[ ] = $tmpNode;
+                            $nodeids[ ] = $tmpNode->ContentObject->ID;
+                        }
+                    }
+                    //If nodelist has enough valid nodes, terminate the foreach
+                    if ( count( $nodeList ) >= $params[ 'SearchLimit' ] )
+                    {
+                        break;
+                    }
                 }
-
-                $nodesParams[] = array( 'ParentNodeID' => $rssSource->SourceNodeID,
-                                        'ResultID' => $rssSource->ID,
-                                        'Depth' => $depth,
-                                        'DepthOperator' => 'eq',
-                                        'MainNodeOnly' => $objectListFilter['main_node_only'],
-                                        'ClassFilterType' => 'include',
-                                        'ClassFilterArray' => array( intval( $rssSource->ClassID ) )
-                                       );
             }
+            else
+            {
+                foreach ( $rssSources as $rssSource )
+                {
+                    // Do not include subnodes
+                    if ( !intval( $rssSource->Subnodes ) )
+                    {
+                        $depth = 1;
+                    }
+                    else // Fetch objects even from subnodes
+                    {
+                        $depth = 0;
+                    }
+                    $nodesParams[ ] = array( 'ParentNodeID' => $rssSource->SourceNodeID,
+                        'ResultID' => $rssSource->ID,
+                        'Depth' => $depth,
+                        'DepthOperator' => 'eq',
+                        'MainNodeOnly' => $objectListFilter[ 'main_node_only' ],
+                        'ClassFilterType' => 'include',
+                        'ClassFilterArray' => array( intval( $rssSource->ClassID ) )
+                    );
+                }
+                $listParams = array( 'Limit' => $objectListFilter[ 'number_of_objects' ],
+                    'SortBy' => array( 'published', false )
+                );
 
-            $listParams = array( 'Limit' => $objectListFilter['number_of_objects'],
-                                 'SortBy' => array( 'published', false )
-                                );
-
-            $nodeList = eZContentObjectTreeNode::subTreeMultiPaths( $nodesParams, $listParams );
+                $nodeList = eZContentObjectTreeNode::subTreeMultiPaths( $nodesParams, $listParams );
+            }//workaround end
         }
         else
             $nodeList = null;
+
+        
+        $elapsed = round( microtime( true ) - $startTime, 4 );
+        eZDebug::writeDebug( get_class( $searchEngine ) . ' fetchNodeList function lasted ' . $elapsed . ' seconds', 'fetchNodeList function' );
+        
         return $nodeList;
     }
 
