performance speed up with core data
<p>I have three core data tables and i am fetching data from all tables but its taking time on device.plz help me</p>

<pre><code>-(void)getArticleNoForkeyword:(NSMutableArray *)array andFile:(NSMutableArray *)arrayFile{


    NSMutableArray *arr=[[NSMutableArray alloc]init];
   context = [appDelegate managedObjectContext];
    entityDesc = [NSEntityDescription entityForName:@"IndexMaster" inManagedObjectContext:context];
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    [request setEntity:entityDesc];
    for (int i=0; i&lt;[arrayFile count]; i++) {
        predicate = [NSPredicate predicateWithFormat:@"(self.indexmasterKeyword  LIKE %@)",[arrayFile objectAtIndex:i]];
       [request setPredicate:predicate];
    NSError *error;
    NSArray *objects = [context executeFetchRequest:request error:&amp;error];

    for (NSManagedObject *info in objects)
    {

        [arr addObject:[info valueForKey:@"indexMasterId"]];
    }
    }

NSMutableArray *submasteridArr=[[NSMutableArray alloc]init];
entityDesc = [NSEntityDescription entityForName:@"IndexSubMaster" inManagedObjectContext:context];
NSFetchRequest *request1 = [[NSFetchRequest alloc] init];
[request1 setEntity:entityDesc];
    for (int k=0; k&lt;[arr count]; k++) {

predicate = [NSPredicate predicateWithFormat:@"(self.indexsubmasterkeyword  LIKE %@ AND self.indexmasterid  LIKE %@) ",  [array objectAtIndex:k],[arr objectAtIndex:k]];
        [request1 setPredicate:predicate];
        NSError *error;
        NSArray *objects = [context executeFetchRequest:request1 error:&amp;error];
        for (NSManagedObject *info in objects)
        {
        [submasteridArr addObject:[info valueForKey:@"indexsubmasterid"]];
        }
    }
        NSArray *subMasterIDArray=[[NSArray alloc]init];
    subMasterIDArray = [[NSSet setWithArray:submasteridArr] allObjects];
 articleWeightArray=[[NSMutableArray alloc]init];
 entityDesc = [NSEntityDescription entityForName:@"IndexDetails" inManagedObjectContext:context];
    NSFetchRequest *request2 = [[NSFetchRequest alloc] init];
    for (int i=0; i&lt;[subMasterIDArray count]; i++) {
        predicate = [NSPredicate predicateWithFormat:@"(self.indexsubmasterid  LIKE %@) ",[subMasterIDArray objectAtIndex:i]];
        [request2 setEntity:entityDesc];
        [request2 setPredicate:predicate];
        NSError *error;
        NSArray *objects = [context executeFetchRequest:request2 error:&amp;error];

        for (NSManagedObject *info in objects)
        { 
        NSMutableDictionary *dic=[[NSMutableDictionary alloc]init];
            [dic setObject:[info valueForKey:@"articleno"] forKey:@"ArticleNo"];
            [dic setObject:[info valueForKey:@"articleweight"] forKey:@"Weight"];
            [articleWeightArray addObject:dic];
            }
    }

    finArray=articleWeightArray;


    }
</code></pre>

<p>array contains keyword like(blood,pressure) and arrayfile contains object first two word like (bl,pr)  finally i am getting article weight and article title from indexdetails table.Everything is fine but performance is issuue.Plz help.if possible then attach some piece of codes
thanks in advance</p>
