Optimizing some, but not all, of the code

  • I'm working on an iPad app that does a lot of computational stuff. This is significantly slower in a Debug build. Much of this computational code is included in the project source. I can do a Release build and it's pretty zippy.

    Is there any way to control the optimizations of a large group of files? I don't want to visit each individual file and set optimizer flags. I suppose I could put a chunk of it into a separate library, but that seems to bring its own set of tediousness.

    Anyway, just looking for suggestions.

    Thanks!

    --
    Rick
  • If you open up the target settings, and visit build phases, you can specify per-file options.  Just stick in a -Os or -O3 in there.

    Thanks

    Tom Davie

    On 4 Jun 2013, at 19:26, Rick Mann <rmann...> wrote:

    > I'm working on an iPad app that does a lot of computational stuff. This is significantly slower in a Debug build. Much of this computational code is included in the project source. I can do a Release build and it's pretty zippy.
    >
    > Is there any way to control the optimizations of a large group of files? I don't want to visit each individual file and set optimizer flags. I suppose I could put a chunk of it into a separate library, but that seems to bring its own set of tediousness.
    >
    > Anyway, just looking for suggestions.
    >
    > Thanks!
    >
    > --
    > Rick
    >
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Xcode-users mailing list      (<Xcode-users...>)
    > Help/Unsubscribe/Update your Subscription:
    > https://lists.apple.com/mailman/options/xcode-users/<tom.davie...>
    >
    > This email sent to <tom.davie...>
  • On Jun 4, 2013, at 7:36 PM, Thomas Davie <tom.davie...> wrote:

    > If you open up the target settings, and visit build phases, you can specify per-file options.  Just stick in a -Os or -O3 in there.

    And if you select a bunch of files and then double-click inside the selection, you can edit all of their custom build options at once.

    —Jens
  • On Jun 4, 2013, at 19:45 , Jens Alfke <jens...> wrote:

    >
    > On Jun 4, 2013, at 7:36 PM, Thomas Davie <tom.davie...> wrote:
    >
    >> If you open up the target settings, and visit build phases, you can specify per-file options.  Just stick in a -Os or -O3 in there.
    >
    > And if you select a bunch of files and then double-click inside the selection, you can edit all of their custom build options at once.

    Oh, thanks. I thought I had tried this once and failed.

    --
    Rick
  • On Jun 4, 2013, at 19:45 , Jens Alfke <jens...> wrote:

    > And if you select a bunch of files and then double-click inside the selection, you can edit all of their custom build options at once.

    So, it turns out, this doesn't always work. I had to select files in smaller groups.

    Having said that, I got -O3 added to each of the files I wanted to optimize. But in the actual compile invocation, there is both a -O0 and a -O3 (in that order). I'm hoping the second overrides the first, but I don't like the ambiguity of it.

    --
    Rick
  • On Jun 11, 2013, at 17:43 , Rick Mann <rmann...> wrote:

    > So, it turns out, this doesn't always work. I had to select files in smaller groups.

    This may not be the reason in your case, but …

    When you double-click to change the settings, the popover appears aligned with the *last* selected file, even when it's scrolled off the bottom of the view. If the relative position is actually off the screen (or possibly the window, I can't remember now), the popover is too, and so isn't visible. The workaround is to scroll to the last selected file before double-clicking.
  • On Jun 11, 2013, at 18:06 , Quincey Morris <quinceymorris...> wrote:

    > This may not be the reason in your case, but …
    >
    > When you double-click to change the settings, the popover appears aligned with the *last* selected file, even when it's scrolled off the bottom of the view. If the relative position is actually off the screen (or possibly the window, I can't remember now), the popover is too, and so isn't visible. The workaround is to scroll to the last selected file before double-clicking.

    That seems to make the difference. If the bottom of the list is not visible, then it ignores the double-click. If the bottom is visible, the blue highlight turns gray, and the edit box appears.

    Thanks!

    --
    Rick
previous month june 2013 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today