Performance

RSS for tag

Improve your app's performance.

Posts under Performance tag

36 Posts
Sort by:
Post not yet marked as solved
0 Replies
477 Views
起動しようとすると予期しない理由で終了しましたと出ます。以下がエラーのレポートです。 なにか原因がご教授してもらえればと思います。 Translated Report (Full Report Below) Process: pgAdmin 4 [1260] Path: /Users/USER/pgAdmin 4.app/Contents/MacOS/pgAdmin 4 Identifier: org.pgadmin.pgadmin4 Version: 7.5 (4280.88) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2023-11-07 21:40:06.2444 +0900 OS Version: macOS 14.1 (23B74) Report Version: 12 Anonymous UUID: A28AA79C-B419-92B4-7831-8810BBA98FFE Sleep/Wake UUID: 433BCF44-5B6D-4F1D-B638-D92BACACE00C Time Awake Since Boot: 480 seconds Time Since Wake: 79 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x1005101F0) Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Codes: 0x0000000000000001, 0x0000000000000020 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [1260] VM Region Info: 0x20 is not in any region. Bytes before following region: 140723128958944 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> mapped file 7ffca81d0000-7ffccd878000 [598.7M] r-x/r-x SM=COW ...t_id=411f6b49 Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x1005101F0) Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread 0 ??? 0x1005101f0 ??? 1 libsystem_platform.dylib 0x7ff813b76393 _sigtramp + 51 2 nwjs Framework 0x11e831522 0x114ead000 + 160974114 3 nwjs Framework 0x11ea4e1f0 0x114ead000 + 163189232 4 nwjs Framework 0x11eabe0db 0x114ead000 + 163647707 5 nwjs Framework 0x11b3ad51a 0x114ead000 + 105907482 6 nwjs Framework 0x11b3b58d9 0x114ead000 + 105941209 7 nwjs Framework 0x11c3444bd 0x114ead000 + 122254525 8 nwjs Framework 0x11c342c46 0x114ead000 + 122248262 9 nwjs Framework 0x11ea4fde5 0x114ead000 + 163196389 10 nwjs Framework 0x11eacac97 0x114ead000 + 163699863 11 nwjs Framework 0x11e7ffcd5 0x114ead000 + 160771285 12 nwjs Framework 0x11e7fef17 0x114ead000 + 160767767 13 nwjs Framework 0x11bea7259 0x114ead000 + 117416537 14 nwjs Framework 0x118319cb0 0x114ead000 + 54971568 15 nwjs Framework 0x11831c494 0x114ead000 + 54981780 16 nwjs Framework 0x11831c927 0x114ead000 + 54982951 17 nwjs Framework 0x118318a63 0x114ead000 + 54966883 18 nwjs Framework 0x117ebb179 0x114ead000 + 50389369 19 nwjs Framework 0x1183191c6 0x114ead000 + 54968774 20 nwjs Framework 0x11a16bf90 0x114ead000 + 86765456 21 nwjs Framework 0x11a171131 0x114ead000 + 86786353 22 nwjs Framework 0x11a16d6d0 0x114ead000 + 86771408 23 nwjs Framework 0x11a25f1da 0x114ead000 + 87761370 24 nwjs Framework 0x11a16f799 0x114ead000 + 86779801 25 nwjs Framework 0x11960f4d2 0x114ead000 + 74851538 26 nwjs Framework 0x119626a6e 0x114ead000 + 74947182 27 nwjs Framework 0x1196264a9 0x114ead000 + 74945705 28 nwjs Framework 0x1196270d5 0x114ead000 + 74948821 29 nwjs Framework 0x119680ec3 0x114ead000 + 75316931 30 nwjs Framework 0x11967da22 0x114ead000 + 75303458 31 nwjs Framework 0x1196806df 0x114ead000 + 75314911 32 CoreFoundation 0x7ff813c23a16 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 33 CoreFoundation 0x7ff813c239b9 __CFRunLoopDoSource0 + 157 34 CoreFoundation 0x7ff813c23788 __CFRunLoopDoSources0 + 215 35 CoreFoundation 0x7ff813c223f8 __CFRunLoopRun + 919 36 CoreFoundation 0x7ff813c21a99 CFRunLoopRunSpecific + 557 37 HIToolbox 0x7ff81e9899d9 RunCurrentEventLoopInMode + 292 38 HIToolbox 0x7ff81e9897e6 ReceiveNextEventCommon + 665 39 HIToolbox 0x7ff81e989531 _BlockUntilNextEventMatchingListInModeWithFilter + 66 40 AppKit 0x7ff817193885 _DPSNextEvent + 880 41 AppKit 0x7ff817a87348 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1304 42 nwjs Framework 0x1190b83f0 0x114ead000 + 69252080 43 nwjs Framework 0x11967da22 0x114ead000 + 75303458 44 nwjs Framework 0x1190b8369 0x114ead000 + 69251945 45 AppKit 0x7ff817184dfa -[NSApplication run] + 603 46 nwjs Framework 0x1196814ac 0x114ead000 + 75318444 47 nwjs Framework 0x11968023c 0x114ead000 + 75313724 48 nwjs Framework 0x119627459 0x114ead000 + 74949721 49 nwjs Framework 0x1195ee15f 0x114ead000 + 74715487 50 nwjs Framework 0x1174fc301 0x114ead000 + 40170241 51 nwjs Framework 0x1174fdc92 0x114ead000 + 40176786 52 nwjs Framework 0x1174f9a5a 0x114ead000 + 40159834 53 nwjs Framework 0x118a351c4 0x114ead000 + 62423492 54 nwjs Framework 0x118a36389 0x114ead000 + 62428041 55 nwjs Framework 0x118a3619d 0x114ead000 + 62427549 56 nwjs Framework 0x118a34867 0x114ead000 + 62421095 57 nwjs Framework 0x118a34b03 0x114ead000 + 62421763 58 nwjs Framework 0x114eb0930 ChromeMain + 560 59 pgAdmin 4 0x10034e87e main + 286 60 dyld 0x20041d3a6 start + 1942
Posted
by TEC3356.
Last updated
.
Post not yet marked as solved
1 Replies
338 Views
What's the best way in Instruments, to measure the amount of time spent on large memory copies? For a very simple example, when directly calling memcpy? Memory copying does not show up in the time profiler, it's not a VM cache miss or zeroing event, etc so it doesn't show there, it doesn't (as far as I can tell) show up in the system trace, and there aren't any other choices.
Posted
by swillits.
Last updated
.
Post marked as solved
5 Replies
740 Views
Has anyone else created a macOS SwiftUI app that uses a Table with a largish (~1000) number of entries? My app works OK at about 100 entries, but slows down as the number of entries increase. How slow? An instrumented test with 1219 entries shows a Hang of over 13 seconds from simply clicking/selecting an item in the table. Instruments says the time is mostly spent in _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION. Digging deeper I see AG::Subgraph::update(unsigned int) and descendants account for about half of the hang time. My app is using @Observable on macOS 14 and is being tested on an M2 Max Studio. There are other reported hangs. All seem to be in Swift/SwiftUI code.
Posted
by marchyman.
Last updated
.
Post not yet marked as solved
0 Replies
225 Views
Hello everyone, I've been trying to improve the performance of a grid view that I've made for an app. Basically, it's like one of those sensory boards and there are circles that, when dragged over, change color and play a little haptic feedback. However, I want the grid to span the entire screen and so by increasing the dimensions of the grid to say, 30x30, I am noticing significant performance decreases. CPU usage increases to 99% and the haptic feedback and animation slow down. I've narrowed down the problem to the drag gesture (not the haptics). Just the drag gesture makes the CPU usage approach 40%. The part where I verify if the drag location is within the bounds of any of the circles increase the CPU though. This is like O(n) but with like 900 grid points doesn't sound like it should be that bad? Is there any way that I can improve the code performance? I've tried putting each row of the grid into a Group and also tried switching to UIKit and using CAReplicatorLayers to construct the grid but ran into a wall when I found out you can't do hit testing on those layers. struct SimpleGrid<H: HapticPlaying>: View { @EnvironmentObject private var hapticEngine: H @State private var touchedGridPoints: Set<GridPoint> = Set<GridPoint>() @State private var hapticDotData: Set<HapticDotPreferenceData> = Set<HapticDotPreferenceData>() @State private var gridScale: CGSize = .zero private var gridDim: (Int, Int) = (30, 30) // (row, column) var body: some View { GeometryReader { viewGeo in VStack(spacing: 0) { ForEach(0..<gridDim.0, id: \.self) { row in Group { HStack(spacing: 0) { ForEach(0..<gridDim.1, id: \.self) { column in HapticDot( size: determineIdealDotSize(viewGeo: viewGeo, defaultDotSize: 10, gridDim: gridDim) ) .padding(.all, 5) .foregroundStyle( touchedGridPoints.contains(GridPoint(x: row, y: column)) ? Color.random : Color.primary ) .opacity(touchedGridPoints.contains(GridPoint(x: row, y: column)) ? 0.5 : 1.0) .background( // Use a geometry reader to get this dot's // location in the view. GeometryReader { dotGeo in Rectangle() .fill(.clear) .updateHapticDotPreferenceData(Set([ HapticDotPreferenceData( gridPoint: GridPoint(x: row, y: column), bounds: dotGeo.frame(in: .global) ) ])) } ) } } } } } .scaleEffect(gridScale, anchor: .center) .onAppear { withAnimation(.spring(duration: 0.6, bounce: 0.4)) { gridScale = CGSize(width: 1.0, height: 1.0) } } .frame(width: viewGeo.size.width, height: viewGeo.size.height, alignment: .center) } // This PreferenceKey allows us to monitor the location and index // of each HapticDot and do stuff with that information. .onPreferenceChange(HapticDotPreferenceKey.self) { value in hapticDotData = value } .gesture( DragGesture(minimumDistance: 0, coordinateSpace: .global) .onChanged { dragValue in hapticEngine.asyncPlayHaptic( intensity: 1.0, sharpness: 1.0 ) if let touchedDotData = hapticDotData.first(where: { $0.bounds.contains(dragValue.location) }) { // Don't perform the animation if this haptic dot // is still in touchedGridPoints. if !touchedGridPoints.contains(touchedDotData.gridPoint) { withAnimation(.linear(duration: 0.5)) { let _ = touchedGridPoints.insert(touchedDotData.gridPoint) } DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { // There is a bug here more visible when the animationDuration is long. // When the point is removed, the colors for // the dots still in touchedGridPoints get recalculated, // so they change colors every time one gets removed. withAnimation { _ = touchedGridPoints.remove(touchedDotData.gridPoint) } } } } } ) } private func determineIdealDotSize(viewGeo: GeometryProxy, defaultDotSize: CGFloat, gridDim: (Int, Int)) -> CGFloat { let idealWidth = min(defaultDotSize, (viewGeo.size.width - (CGFloat(gridDim.1)*5*2)) / CGFloat(gridDim.1)) let idealHeight = min(defaultDotSize, (viewGeo.size.height - (CGFloat(gridDim.0)*5*2)) / CGFloat(gridDim.0)) let idealSize = max(0, min(idealWidth, idealHeight)) return idealSize } }
Posted
by glat1957.
Last updated
.
Post not yet marked as solved
1 Replies
449 Views
Hello. When I try to profile a frame capture of an app running on iPad, I get the following error: Unexpected Replayer Termination Abort trap: 6 This is my configuration: macOS 14.0 Xcode 15.0 iPad Pro (10.5-inch) - A10X iPadOS 17.2 Is this expected? Is there a way to fix the issue? Thanks
Posted
by ggarbin.
Last updated
.
Post not yet marked as solved
2 Replies
569 Views
Instruments in XCode 14 used to support CPU counters in A16 with iOS 16.x, but after I upgrade iOS to 17.1 and also XCode to 15.0.1, In "CPU Counters", it says "CPU Name: Unsupported" and thus I cannot choose "Sample by" events etc. Found some link on this:https://stackoverflow.com/questions/77344529/is-latest-instruments-not-support-a17-pro-for-cpu-counters Please help to confirm this is some known issue, and if so, how to fix it. Thanks!
Posted
by Carton2.
Last updated
.
Post not yet marked as solved
1 Replies
338 Views
Hello everyone, I need your help with a performance issue I’m encountering in my app. I’m learning app development in SwiftUI, and I built a simple budgeting app based on the 50/30/20 rule, which consists in dividing your expenses in “Needs”’, “Wants”, and “Savings and debts”. The main objects of my app are months, and transactions, each month containing an array of associated transactions. My app shows graphs for the current month. For example, it can show a pie chart representing the expenses of different categories. Now, in order to create these graphs, I have to compute some numbers from the month. For example, I have to retrieve the percent of the budget that has been spent. For now, I did this by adding various computed variables to my MonthBudget model, which is the model containing the transactions. This looks something like this: @Model final class MonthBudget { @Relationship(deleteRule: .cascade) var transactions: [Transaction]? = [] let identifier: UUID = UUID() var monthlyBudget: Double = 0 var needsBudgetRepartition: Double = 50 var wantsBudgetRepartition: Double = 30 var savingsDebtsBudgetRepartition: Double = 20 // Definition of other variables... } extension MonthBudget { @Transient var totalSpent: Double { spentNeedsBudget + spentWantsBudget + spentSavingsDebtsBudget } @Transient var remaining: Double { totalAvailableFunds + totalSpent } // Negative amount spent for a specific category (ex: -250) @Transient var spentNeedsBudget: Double { transactions!.filter { $0.category == .needs &amp;&amp; $0.amount &lt; 0 }.reduce(0, { $0 + $1.amount }) } @Transient var spentWantsBudget: Double { transactions!.filter { $0.category == .wants &amp;&amp; $0.amount &lt; 0 }.reduce(0, { $0 + $1.amount }) } @Transient var spentSavingsDebtsBudget: Double { transactions!.filter { $0.category == .savingsDebts &amp;&amp; $0.amount &lt; 0 }.reduce(0, { $0 + $1.amount }) } // Definition of multiple other computed properties... } Now, this approach worked fine when I only had one or two months with a few transactions in memory. But now that I’m actually using the app, I see serious performance issues (most notably hangs/freezes) whenever I am trying to display a graph. I used “Instruments” to inspect what was going wrong with my app, and I saw that the hangs happened mostly when trying to get the value of these variables, meaning that the actual computing was taking too long. I’m therefore trying to find a more efficient way of getting these informations (totalSpent, spentNeedsBudget, etc.). Is there a common practice that would help with these performance issues? I thought about caching the last computed property (and persist it using SwiftData), and using a function that would re-compute and persist all of these properties whenever a transaction is added or removed. But this has multiple cons: I’d have to call the function that re-computes the properties and stores them in memory each time I delete/add a transaction, losing the very benefit of using computed properties This would potentially be a bad idea: if there’s some sort of bug with SwiftData and one or multiple transactions are added or deleted without the user actually doing anything, there could be a mismatch between the persisted amount/value and the actual value. Did any of you face the same issue as me, and if so, how did you solve it? Any idea is appreciated! Thanks for reading so far, Louis.
Posted Last updated
.
Post not yet marked as solved
0 Replies
217 Views
Hi, team. Our team is planning to address the app performance issue of the app. And so far I've found the peer group benchmark for crashes, but couldn't find it for hang rates. Can I get the data from App Store Connect or is the team planning to provide this data in the near future? Thank you for reading.
Posted Last updated
.
Post not yet marked as solved
1 Replies
1k Views
Hi, This topic is about Workgroups. I create child processes and I'd like to communicate a os_workgroup_t to my child process so they can join the work group as well. As far as I understand, the os_workgroup_t value is local to the process. I've found that one can use os_workgroup_copy_port() and os_workgroup_create_with_port(), but I'm not familiar at all with ports and I wonder what would be the minimal effort to achieve that. Thank you very much! Alex
Posted
by abique.
Last updated
.
Post not yet marked as solved
1 Replies
393 Views
I have built an application to measure network throughput using Network.framework. Since the Sonoma Update, I've encountered some strange performance issues with this framework. I use the Loopback Channel by running the server on my Mac itself, which is written in Golang. Before the update, performance was not an issue. After the update, however, the throughput fluctuates significantly. I started to investigate, I use the following function to parse the data: connection.receive(minimumIncompleteLength: 1, maximumLength: 32768) { // My frame parsing code } When I use a higher maximumLength, for example, 65536 bytes, it starts to fluctuate, and the received message size for parsing varies between 2.6 Mbytes and 7 Mbytes. However, if the maximumLength is 32768 or lower, and the message size is smaller or larger than this range, then the performance is as expected. To further isolate the issue, I forced the server to just send messages and removed my frame parsing code, ensuring that the problem is not related to this. This behavior is very peculiar, and I'm unsure how to fix it. Are there others who have experienced similar performance problems? It's worth noting that this issue occurs only with downstream performance, not with upstream.
Posted
by Vinz1911.
Last updated
.
Post not yet marked as solved
36 Replies
20k Views
After creating a basic table the application crashed while running a select query. Translated Report (Full Report Below) Process:               MySQLWorkbench [1687] Path:                  /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench Identifier:            com.oracle.workbench.MySQLWorkbench Version:               8.0.32.CE (1) Code Type:             X86-64 (Translated) Parent Process:        launchd [1] User ID:               501 Date/Time:             2023-02-02 11:58:46.6293 +0530 OS Version:            macOS 13.2 (22D49) Report Version:        12 Anonymous UUID:        7B20408B-A4BE-478D-8402-4595E3D3D9C4 Time Awake Since Boot: 880 seconds System Integrity Protection: enabled Crashed Thread:        0  Dispatch queue: com.apple.main-thread Exception Type:        EXC_BAD_INSTRUCTION (SIGILL) Exception Codes:       0x0000000000000001, 0x0000000000000000 Termination Reason:    Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process:   exc handler [1687] Application Specific Backtrace 0: 0   CoreFoundation                      0x00007ff8141d3cb3 __exceptionPreprocess + 242 1   libobjc.A.dylib                     0x00007ff813d2210a objc_exception_throw + 48 2   CoreFoundation                      0x00007ff81426abbe -[NSObject(NSObject) __retain_OA] + 0 3   CoreFoundation                      0x00007ff81413eab0 forwarding + 1324 4   CoreFoundation                      0x00007ff81413e4f8 _CF_forwarding_prep_0 + 120 5   WBExtras                            0x0000000109c371a1 -[MResultsetViewer tableView:willDisplayCell:forTableColumn:row:] + 393 6   AppKit                              0x00007ff81753282e -[NSTableView _delegateWillDisplayCell:forColumn:row:] + 104 7   AppKit                              0x00007ff817477676 -[NSTableView preparedCellAtColumn:row:] + 1835 8   MySQLWorkbench                      0x0000000100bdfa98 -[MGridView preparedCellAtColumn:row:] + 54 9   AppKit                              0x00007ff817476e41 -[NSTableView _drawContentsAtRow:column:withCellFrame:] + 42 10  AppKit                              0x00007ff817476ac1 -[NSTableView drawRow:clipRect:] + 1638 11  AppKit                              0x00007ff81747613c -[NSTableView drawRowIndexes:clipRect:] + 707 12  AppKit                              0x00007ff817401cc4 -[NSTableView drawRect:] + 1670 13  AppKit                              0x00007ff817334144 _NSViewDrawRect + 121 14  AppKit                              0x00007ff817b193c3 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 1810 15  AppKit                              0x00007ff817333870 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 753 16  QuartzCore                          0x00007ff81c16db59 CABackingStoreUpdate_ + 254 17  QuartzCore                          0x00007ff81c1d13c1 ___ZN2CA5Layer8display_Ev_block_invoke + 53 18  QuartzCore                          0x00007ff81c16cd66 -[CALayer _display] + 2275 19  AppKit                              0x00007ff8173334c5 -[_NSBackingLayer display] + 462 20  AppKit                              0x00007ff8172ab455 -[_NSViewBackingLayer display] + 554 21  QuartzCore                          0x00007ff81c16bd08 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 900 22  QuartzCore                          0x00007ff81c2e56c6 _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 648 23  QuartzCore                          0x00007ff81c14cb35 _ZN2CA11Transaction6commitEv + 725 24  AppKit                              0x00007ff81734496f __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285 25  AppKit                              0x00007ff817b5c767 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41 26  CoreFoundation                      0x00007ff81415b3e1 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 27  CoreFoundation                      0x00007ff81415b309 __CFRunLoopDoObservers + 482 28  CoreFoundation                      0x00007ff81415a866 __CFRunLoopRun + 877 29  CoreFoundation                      0x00007ff814159e7f CFRunLoopRunSpecific + 560 30  HIToolbox                           0x00007ff81dfec766 RunCurrentEventLoopInMode + 292 31  HIToolbox                           0x00007ff81dfec576 ReceiveNextEventCommon + 679 32  HIToolbox                           0x00007ff81dfec2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70 33  AppKit                              0x00007ff8171e5293 _DPSNextEvent + 909 34  AppKit                              0x00007ff8171e4114 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219 35  AppKit                              0x00007ff8171d6757 -[NSApplication run] + 586 36  AppKit                              0x00007ff8171aa797 NSApplicationMain + 817 37  dyld                                0x0000000200ff6310 start + 2432 Kernel Triage: VM - pmap_enter retried due to resource shortage Thread 0 Crashed::  Dispatch queue: com.apple.main-thread 0   AppKit                            0x7ff81754dc26 -[NSApplication _crashOnException:] + 287 1   AppKit                            0x7ff817344bab __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 857 2   AppKit                            0x7ff817b5c767 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41 3   CoreFoundation                    0x7ff81415b3e1 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23 4   CoreFoundation                    0x7ff81415b309 __CFRunLoopDoObservers + 482 5   CoreFoundation                    0x7ff81415a866 __CFRunLoopRun + 877 6   CoreFoundation                    0x7ff814159e7f CFRunLoopRunSpecific + 560 7   HIToolbox                         0x7ff81dfec766 RunCurrentEventLoopInMode + 292 8   HIToolbox                         0x7ff81dfec576 ReceiveNextEventCommon + 679 9   HIToolbox                         0x7ff81dfec2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70 10  AppKit                            0x7ff8171e5293 _DPSNextEvent + 909 11  AppKit                            0x7ff8171e4114 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219 12  AppKit                            0x7ff8171d6757 -[NSApplication run] + 586 13  AppKit                            0x7ff8171aa797 NSApplicationMain + 817 14  dyld                                 0x200ff6310 start + 2432 Thread 1:: com.apple.rosetta.exceptionserver 0   runtime                           0x7ff7ffc73614 0x7ff7ffc6f000 + 17940 1   runtime                           0x7ff7ffc7f530 0x7ff7ffc6f000 + 66864 2   runtime                           0x7ff7ffc80f30 0x7ff7ffc6f000 + 73520 Thread 2: 0   runtime                           0x7ff7ffc9187c 0x7ff7ffc6f000 + 141436
Posted
by anshgupta.
Last updated
.
Post not yet marked as solved
0 Replies
444 Views
Hi everyone, Wondering if you know how the device decide which compute unit (GPU, CPU or ANE) to use when compute units are set to ALL? I'm working on optimizing a GPT2 model to run on ANE. I ran the performance report for the existing model and the report showed me operators not supported by ANE. Then I went onto remove these operators and converted the model to CoreML again. This time the performance report showed that every operator is supported by ANE but the device still prefers GPU when the compute units are set to ALL and perfers CPU when the compute units are set to CPU and ANE. ALL CPU and ANE Does anyone know why? Thank you in advance!
Posted
by dcdcdc123.
Last updated
.
Post not yet marked as solved
1 Replies
514 Views
Hi folks, I'm working on converting a GPT2 model to coreml with KV caching enabled. I have a GPT2 model runinng on GPU with static input shape It seems once I enable flexible shape (i.e. either range shape or enumerated shape), the model will be run on CPU according to the performance report. I can see new operators being added ( get_shape and general_slice ) and it is not supported by GPU / ANE Wondering if there's any way to get around this to get the model running on GPU / ANE? How does the machine decide whether to run the model on GPU / Neural Engine? Thanks!
Posted
by dcdcdc123.
Last updated
.
Post marked as solved
3 Replies
546 Views
We are using the CoreBluetooth framework to communicate with a BLE device. We have the requirement to take many RSSI measures over a short span of time. To obtain these measurements, we call readRSSI on the peripheral object. The behavior we observe is that Core Bluetooth invokes didReadRSSI only once every second. This behavior does not seem to be documented anywhere. We have found several reports of the same issue, which have not been answered. For Example: https://developer.apple.com/forums/thread/698235 https://developer.apple.com/forums/thread/77277 https://stackoverflow.com/questions/61216589/fast-update-rssi-bluetooth-in-ios The first question would be: Is this the intended behavior? Secondly, is it documented somewhere? And lastly, are there any workarounds that would allow for a higher rate of taking RSSI measurements than 1 per second?
Posted
by aruhk.
Last updated
.
Post marked as solved
1 Replies
373 Views
CoreBluetooth will only update the RSSI value for a connected BLE device at least one second after the last call to readRSSI, effectively limiting the rate at which the RSSI value can be read to once every second. Is this a momentary measurement, or does it represent some kind of average over this one second? If this is not an average, what is the rationale for limiting the rate at which the RSSI value can be measured? Rate limitation verified in this thread: https://developer.apple.com/forums/thread/739727
Posted
by aruhk.
Last updated
.
Post not yet marked as solved
21 Replies
2.1k Views
Hello, I Run MacOs ventura 13.6 and command line tools 15.0 on MacBook Intel I7 post 2018. After installing clang 15.0 the performance of C++ test programs shows 4 at 5 times slower execution time compared to Clang 13.0 Has anybody observed this slow down ? The tests using a lot of mathematical computations is compiled with the folowing command : g++ -std=c++17 -march=native -funroll-loops -Ofast -DNDEBUG -o a atest.cpp So I had to revert to Clang 13.0 to have reasonnable execution time . What makes C++ code so slow ?
Posted
by djm44.
Last updated
.
Post not yet marked as solved
0 Replies
502 Views
I’m trying to achieve vertical split view in SwiftUI. There are two views, top one is Map (MKMapView actually, wrapped with UIViewRepresentable) and bottom one for this example could be Color.red. Between them there’s a handle to resize the proportions. Initial proportions are 0.3 of height for bottom, 0.7 for map. When resizing map frame, it feels choppy and slow. Replacing MapView with any other view does not produce the same issue. Issue appears only on my real device (iPhone 11 Pro Max) simulator works fine.
Posted
by dvxiel.
Last updated
.
Post not yet marked as solved
0 Replies
546 Views
Hi, I am running Mac Intel I7 post 2020 with Sonoma and clang 15.0 . The Clang 15.0 makes c++ code running 5 times slower than it was before upgrade from Ventura 13.6 and Clang 14.3.1 The other trouble is that Sonoma does not allow to revert to Clang 14.3.1 . I do not use Xcode only command line tools . here my options : g++ -std=c++17 -Ofast -march=native -funroll-loops -flto -DNDEBUG -o a prog.cpp So what happened to C++ ?
Posted
by djm44.
Last updated
.