Coredata and NSTableview - Delay on focus when open modal window after mac osx system update
up vote
0
down vote
favorite
I have a mac osx app built with xcode 5 which runs on mac osx 10.8. My app has a lot of windows with table view and all the data are managed by coredata frameworks via several NSArraycontrollers.
The app runs properly.
I have updated my system to mac osx 10.13 and xcode to version 9. When I opened my project in Xcode 9, the program gave me several suggested upgrades, and a lot of deprecated methods. I fixed all that stuff and the app now runs also on my new osx system although I have a little problem.
In the main window there is a table view with about 1000 rows. Doubleclicking on a row, a new modal window opens with all the details of the selected item. The modal window appears immediately but it takes too much time to obtain focus. If I close this modal window, the main window also takes time to focus.
This lag time varies according to the number of visible rows in the main table view.
With the old osx and xcode versions there was no lag time problem. Can anyone help me?
UPDATE:
The app runs without the changes but with the same lag problem. In the modal window there are several NSTextfields bounded to another NSArraycontroller that fetches data from Coredata.
This is the code to open and close modal window:
- (IBAction)openModalWindow:(id)sender {
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
[self disattivaMenu];
[scrollViewModalWindow setDocumentView:viewSpeaker];
[self scrollToTop:scrollViewModalWindow];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:undoManager];
[mainWindow beginSheet:modalWindow completionHandler:nil];
} }
- (IBAction)closeModalWindow:(id)sender {
[self saveAction:self];
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
Speaker *speakerSelezionato=[result objectAtIndex:0];
//I made a lot of stuff….
//…..
//…..
[tableViewGrigliaOspiti reloadData];
}
[[self managedObjectContext] processPendingChanges];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:nil];
[sheetInfoMail orderOut:self];
[NSApp endSheet:modalWindow];
[modalWindow orderOut:self];
[self attivaMenu];}
Are there any tricks in Instruments in order to identify the problem? I don't know how to use it.
macos core-data nstableview lag
add a comment |
up vote
0
down vote
favorite
I have a mac osx app built with xcode 5 which runs on mac osx 10.8. My app has a lot of windows with table view and all the data are managed by coredata frameworks via several NSArraycontrollers.
The app runs properly.
I have updated my system to mac osx 10.13 and xcode to version 9. When I opened my project in Xcode 9, the program gave me several suggested upgrades, and a lot of deprecated methods. I fixed all that stuff and the app now runs also on my new osx system although I have a little problem.
In the main window there is a table view with about 1000 rows. Doubleclicking on a row, a new modal window opens with all the details of the selected item. The modal window appears immediately but it takes too much time to obtain focus. If I close this modal window, the main window also takes time to focus.
This lag time varies according to the number of visible rows in the main table view.
With the old osx and xcode versions there was no lag time problem. Can anyone help me?
UPDATE:
The app runs without the changes but with the same lag problem. In the modal window there are several NSTextfields bounded to another NSArraycontroller that fetches data from Coredata.
This is the code to open and close modal window:
- (IBAction)openModalWindow:(id)sender {
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
[self disattivaMenu];
[scrollViewModalWindow setDocumentView:viewSpeaker];
[self scrollToTop:scrollViewModalWindow];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:undoManager];
[mainWindow beginSheet:modalWindow completionHandler:nil];
} }
- (IBAction)closeModalWindow:(id)sender {
[self saveAction:self];
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
Speaker *speakerSelezionato=[result objectAtIndex:0];
//I made a lot of stuff….
//…..
//…..
[tableViewGrigliaOspiti reloadData];
}
[[self managedObjectContext] processPendingChanges];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:nil];
[sheetInfoMail orderOut:self];
[NSApp endSheet:modalWindow];
[modalWindow orderOut:self];
[self attivaMenu];}
Are there any tricks in Instruments in order to identify the problem? I don't know how to use it.
macos core-data nstableview lag
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a mac osx app built with xcode 5 which runs on mac osx 10.8. My app has a lot of windows with table view and all the data are managed by coredata frameworks via several NSArraycontrollers.
The app runs properly.
I have updated my system to mac osx 10.13 and xcode to version 9. When I opened my project in Xcode 9, the program gave me several suggested upgrades, and a lot of deprecated methods. I fixed all that stuff and the app now runs also on my new osx system although I have a little problem.
In the main window there is a table view with about 1000 rows. Doubleclicking on a row, a new modal window opens with all the details of the selected item. The modal window appears immediately but it takes too much time to obtain focus. If I close this modal window, the main window also takes time to focus.
This lag time varies according to the number of visible rows in the main table view.
With the old osx and xcode versions there was no lag time problem. Can anyone help me?
UPDATE:
The app runs without the changes but with the same lag problem. In the modal window there are several NSTextfields bounded to another NSArraycontroller that fetches data from Coredata.
This is the code to open and close modal window:
- (IBAction)openModalWindow:(id)sender {
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
[self disattivaMenu];
[scrollViewModalWindow setDocumentView:viewSpeaker];
[self scrollToTop:scrollViewModalWindow];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:undoManager];
[mainWindow beginSheet:modalWindow completionHandler:nil];
} }
- (IBAction)closeModalWindow:(id)sender {
[self saveAction:self];
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
Speaker *speakerSelezionato=[result objectAtIndex:0];
//I made a lot of stuff….
//…..
//…..
[tableViewGrigliaOspiti reloadData];
}
[[self managedObjectContext] processPendingChanges];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:nil];
[sheetInfoMail orderOut:self];
[NSApp endSheet:modalWindow];
[modalWindow orderOut:self];
[self attivaMenu];}
Are there any tricks in Instruments in order to identify the problem? I don't know how to use it.
macos core-data nstableview lag
I have a mac osx app built with xcode 5 which runs on mac osx 10.8. My app has a lot of windows with table view and all the data are managed by coredata frameworks via several NSArraycontrollers.
The app runs properly.
I have updated my system to mac osx 10.13 and xcode to version 9. When I opened my project in Xcode 9, the program gave me several suggested upgrades, and a lot of deprecated methods. I fixed all that stuff and the app now runs also on my new osx system although I have a little problem.
In the main window there is a table view with about 1000 rows. Doubleclicking on a row, a new modal window opens with all the details of the selected item. The modal window appears immediately but it takes too much time to obtain focus. If I close this modal window, the main window also takes time to focus.
This lag time varies according to the number of visible rows in the main table view.
With the old osx and xcode versions there was no lag time problem. Can anyone help me?
UPDATE:
The app runs without the changes but with the same lag problem. In the modal window there are several NSTextfields bounded to another NSArraycontroller that fetches data from Coredata.
This is the code to open and close modal window:
- (IBAction)openModalWindow:(id)sender {
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
[self disattivaMenu];
[scrollViewModalWindow setDocumentView:viewSpeaker];
[self scrollToTop:scrollViewModalWindow];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:undoManager];
[mainWindow beginSheet:modalWindow completionHandler:nil];
} }
- (IBAction)closeModalWindow:(id)sender {
[self saveAction:self];
NSArray *result=[arrayControllerSpeaker selectedObjects];
if ([result count]==1) {
Speaker *speakerSelezionato=[result objectAtIndex:0];
//I made a lot of stuff….
//…..
//…..
[tableViewGrigliaOspiti reloadData];
}
[[self managedObjectContext] processPendingChanges];
[undoManager removeAllActions];
[[self managedObjectContext]setUndoManager:nil];
[sheetInfoMail orderOut:self];
[NSApp endSheet:modalWindow];
[modalWindow orderOut:self];
[self attivaMenu];}
Are there any tricks in Instruments in order to identify the problem? I don't know how to use it.
macos core-data nstableview lag
macos core-data nstableview lag
edited Nov 9 at 10:45
asked Nov 8 at 19:31
Max Colla
134
134
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46
add a comment |
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53214881%2fcoredata-and-nstableview-delay-on-focus-when-open-modal-window-after-mac-osx-s%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does your app run without the changes? Did you use Instruments to profile your app? What's in the modal window, more table views and array controllers? Add the code to open, run and close the modal window to the question please.
– Willeke
Nov 9 at 0:14
Hi Willeke, I have update my question, thanks a lot
– Max Colla
Nov 9 at 10:46