glimpseio / Splice

Issues and support files for the Splice app by Glimpse I/O
https://glimpse.io
0 stars 0 forks source link

Disable fetching all schemas? #18

Open jpommerening opened 5 years ago

jpommerening commented 5 years ago

Hi!

I'm just trying out splice for work. We have a bunch of Oracle servers and each server is pre-configured with a bunch of enumerated schemas for each developer (think username01 through username20).

When connecting to one of those servers, Splice fetches all of these schemas giving me a list of a couple hundred items in the outline (of which I can only access the one matching my username) and freezing Splice for about a minute.

Since this is related to the way we set up our database server I guess there won't be a one-size-fits-all solution. Is there a way to filter the schemas when setting up the connection? Maybe some advanced config option I don't know of?

marcprux commented 5 years ago

Oracle's slow schema retrieval is a known issue. One thing that might help is to edit the connection's "Advanced" properties and change the "restrictGetTables" property from "false" to "true". That may reduce the number of schemas that are returned.

Other than that, we don't currently have a good way to restrict the schemas that are queried when you first connect, but you can hide the schema items that you aren't interested in seeing by selecting all the schema/table items and right-clicking to see the "Hide Item(s)" menu item, which will prevent the undesired schema items from being displayed. If you want to see the hidden items again later, you can select "View"/"Display Hidden Items".

Please let us know if this helps your scenario or not.

jpommerening commented 5 years ago

Hey Marc,

thanks for your super quick reply!

The "restrictGetTables" property does not seem to make a difference. I followed your advice hiding the schemas I'm not interested in and it works as expected, giving me a pleasantly snappy UI, thanks! However, upon restarting Splice and reconnecting to that same database the app freezes again … and hasn't come back to life since. But it's maxing out one core, and keeps consuming memory (10GB and counting) so it seems to be doing something

jpommerening commented 5 years ago

In case it is of any help, here's a snippet I copied from Apple's crash reporter:

Date/Time:       2018-11-05 17:36:47 +0100
OS Version:      Mac OS X 10.13.6 (Build 17G65)
Architecture:    x86_64h
Report Version:  26

Data Source:     Stackshots

Command:         Splice
Path:            /Applications/Splice.app/Contents/MacOS/Splice
Identifier:      io.glimpse.Splice
Version:         1.1.0 (74)
App Item ID:     1363505768
App External ID: 828125501
Parent:          launchd [1]
PID:             46684

Event:           hang
Duration:        1.00s (process was unresponsive for 304 seconds before sampling)
Steps:           10 (100ms sampling interval)

Hardware model:  MacBookPro14,2
Active cpus:     4

Time Awake Since Boot: 870000s
Time Since Wake: 6700s

Fan speed:       4081 rpm

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------

Heaviest stack for the main thread of the target process:
  10  start + 1 (libdyld.dylib + 4117) [0x7fff714b3015]
  10  ??? (Splice + 11833) [0x10b3ede39]
  10  NSApplicationMain + 804 (AppKit + 23154) [0x7fff46bd5a72]
  10  -[NSApplication run] + 764 (AppKit + 223365) [0x7fff46c06885]
  10  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 (AppKit + 8224308) [0x7fff473a7e34]
  10  _DPSNextEvent + 2085 (AppKit + 268915) [0x7fff46c11a73]
  10  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 194692) [0x7fff48960884]
  10  ReceiveNextEventCommon + 613 (HIToolbox + 195334) [0x7fff48960b06]
  10  RunCurrentEventLoopInMode + 286 (HIToolbox + 195990) [0x7fff48960d96]
  10  CFRunLoopRunSpecific + 483 (CoreFoundation + 545107) [0x7fff49676153]
  10  __CFRunLoopRun + 2586 (CoreFoundation + 548346) [0x7fff49676dfa]
  10  __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 (CoreFoundation + 801817) [0x7fff496b4c19]
  10  _dispatch_main_queue_callback_4CF + 1148 (libdispatch.dylib + 54165) [0x7fff71485395]
  10  _dispatch_client_callout + 8 (libdispatch.dylib + 7608) [0x7fff71479db8]
  10  _dispatch_call_block_and_release + 12 (libdispatch.dylib + 38394) [0x7fff714815fa]
  10  ??? (<9825DEB3-0BC2-3916-8510-983B89C1ADF4> + 759696) [0x10bd8a790]
  10  ??? (<9825DEB3-0BC2-3916-8510-983B89C1ADF4> + 30325) [0x10bcd8675]
  10  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 2536390) [0x10d4fa3c6]
  10  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 2536214) [0x10d4fa316]
  10  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 507207) [0x10d30ad47]
  10  _NSSetObjectValueAndNotify + 262 (Foundation + 417393) [0x7fff4b7b7e71]
  10  -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 61 (Foundation + 27685) [0x7fff4b758c25]
  10  -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 769 (Foundation + 1543358) [0x7fff4b8cacbe]
  10  NSKeyValueDidChange + 475 (Foundation + 242477) [0x7fff4b78d32d]
  10  NSKeyValueNotifyObserver + 350 (Foundation + 244345) [0x7fff4b78da79]
  10  -[NSTreeControllerTreeNode observeValueForKeyPath:ofObject:change:context:] + 295 (AppKit + 10235511) [0x7fff47592e77]
  10  -[NSTreeControllerTreeNode updateChildNodesForKeyPath:affectedIndexPaths:] + 3422 (AppKit + 3143372) [0x7fff46ecf6cc]
  10  NSKeyValueDidChangeWithPerThreadPendingNotifications + 132 (Foundation + 1539664) [0x7fff4b8c9e50]
  10  NSKeyValueDidChange + 475 (Foundation + 242477) [0x7fff4b78d32d]
  10  NSKeyValueNotifyObserver + 350 (Foundation + 244345) [0x7fff4b78da79]
  10  -[NSOutlineViewBinder observeValueForKeyPath:ofObject:change:context:] + 425 (AppKit + 3152538) [0x7fff46ed1a9a]
  10  -[NSOutlineViewBinder _childrenChangedForNode:] + 123 (AppKit + 7346246) [0x7fff472d1846]
  10  -[NSOutlineView reloadItem:reloadChildren:] + 2828 (AppKit + 3432289) [0x7fff46f15f61]
  10  -[NSTableRowData _doWorkAfterEndUpdates] + 85 (AppKit + 1278608) [0x7fff46d08290]
  10  -[NSTableRowData _updateVisibleViewsBasedOnUpdateItemsAnimated] + 234 (AppKit + 2127328) [0x7fff46dd75e0]
  10  -[NSTableRowData _updateVisibleViewsBasedOnUpdateItems] + 3748 (AppKit + 2131408) [0x7fff46dd85d0]
  10  -[NSTableRowData _addRowViewForVisibleRow:withPriorView:] + 392 (AppKit + 1330897) [0x7fff46d14ed1]
  6  -[NSTableRowData _preparedRowViewForRow:storageHandler:] + 154 (AppKit + 10692970) [0x7fff4760296a]
  6  -[NSTableRowData _initializeRowView:atRow:] + 397 (AppKit + 1338020) [0x7fff46d16aa4]
  6  -[NSTableRowData _addViewsToRowView:atRow:] + 211 (AppKit + 1344545) [0x7fff46d18421]
  4  -[NSTableRowData _addViewToRowView:atColumn:row:] + 342 (AppKit + 1345351) [0x7fff46d18747]
  4  -[NSTableView(NSTableViewViewBased) makeViewForTableColumn:row:] + 87 (AppKit + 1347268) [0x7fff46d18ec4]
  4  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 4422141) [0x10d6c69fd]
  3  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 4421440) [0x10d6c6740]
  3  ??? (<7F7D2993-C5CF-398F-994F-0310B4E4659F> + 13273) [0x10b4023d9]
  3  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 4421980) [0x10d6c695c]
  2  ??? (<A8DBDF2A-47DE-394F-9785-98B0E5525A3E> + 4421616) [0x10d6c67f0]
  1  -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 198 (AppKit + 611987) [0x7fff46c65693]
  1  +[NSProxy alloc] + 1 (Foundation + 303733) [0x7fff4b79c275] (running)
marcprux commented 5 years ago

Thanks for the debug info. If the app ever comes back after the hang, are the schemas successfully hidden? And if you then "show hidden items", do they appear again?

jpommerening commented 5 years ago

I gave it another shot, but it's been completely stuck for the past 10 minutes …

marcprux commented 5 years ago

We're working on the performance issue and we will be issuing an update within the next few days. For the time being, your best bet is to delete the .splice file and create a new one and no hide the schemas for the Oracle connection. Once the update is released on the App Store, you should be able to go back to hiding the schemas.

Out of curiosity, about how many schemas are we talking about? Dozens, or hundreds?

marcprux commented 5 years ago

Release 1.1.1 should be available now. Can you try it out and see if it help address your issue?

jpommerening commented 5 years ago

I‘ll definitely give it another shot at work tomorrow!

Oh, and yes, it really ist more like hundreds of schemas. What seems to stop (for example) DBeaver from freezing is that it only shows schemas which I actually can access, grants-wise.

On 7. Nov 2018, at 16:25, marcprux notifications@github.com wrote:

Release 1.1.1 should be available now. Can you try it out and see if it help address your issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

marcprux commented 5 years ago

Did you manage to test this out? We're also working on a new release that provides some more performance improvements to schema fetching and hiding.

jpommerening commented 5 years ago

Ah, sorry Marc, I wanted to reply earlier but it slipped my mind before I got around to it.

I tried it again with

Path:            /Applications/Splice.app/Contents/MacOS/Splice
Identifier:      io.glimpse.Splice
Version:         1.1.1 (76)
App Item ID:     1363505768
App External ID: 829202096

But no luck, still hangs. Let me know if I can help you out with more data :)