Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

freezing UI

6 posts in General Discussion Last posting was on 2009-04-28 01:54:30.0Z
Michal Dobisek Posted on 2009-04-02 11:57:52.0Z
From: Michal Dobisek <michal.dobisek@gmail.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
Subject: freezing UI
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49d4a840$1@forums-1-dub>
Date: 2 Apr 2009 03:57:52 -0800
X-Trace: forums-1-dub 1238673472 10.22.241.152 (2 Apr 2009 03:57:52 -0800)
X-Original-Trace: 2 Apr 2009 03:57:52 -0800, vip152.sybase.com
Lines: 96
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:839
Article PK: 1088532

Hi,

when working with Workspace 2.1, the application sometimes stop
responding for a while (could be 10seconds, but even more than a
minute). The problem seems to occur when I am in SQL editor and the
application starts doing something to init content assist. I.e. when I write

select * from |
or
select * from Table where f|

(| is the cursor). I enabled JMX and took a stack trace during one of
the freezes. I am pasting it at the end of the post. It seems like some
server call is done right from the GUI thread and for some reason it
takes long.

Is there any chance to have this bug fixed? It's quite annoying.

Thanks,

Michal


Stack trace (thread main):
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
com.sybase.jdbc3.timedio.RawDbio.reallyRead(Unknown Source)
com.sybase.jdbc3.timedio.Dbio.doRead(Unknown Source)
com.sybase.jdbc3.timedio.InStreamMgr.a(Unknown Source)
com.sybase.jdbc3.timedio.InStreamMgr.doRead(Unknown Source)
com.sybase.jdbc3.tds.TdsProtocolContext.getChunk(Unknown Source)
com.sybase.jdbc3.tds.PduInputFormatter.a(Unknown Source)
com.sybase.jdbc3.tds.PduInputFormatter.read(Unknown Source)
com.sybase.jdbc3.tds.TdsInputStream.read(Unknown Source)
com.sybase.jdbc3.tds.TdsInputStream.readUnsignedByte(Unknown Source)
com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
com.sybase.jdbc3.tds.Tds.dynamicDeallocate(Unknown Source)
com.sybase.jdbc3.jdbc.SybPreparedStatement.deallocateDynamic(Unknown Source)
com.sybase.jdbc3.jdbc.SybStatement.close(Unknown Source)
com.sybase.jdbc3.jdbc.SybStatement.close(Unknown Source)
org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogUtils.cleanupJDBCResouce(Unknown
Source)
org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogColumn.loadColumnInfo(Unknown
Source)
org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogColumn.isNullable(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposal.<init>(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposal.<init>(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.loadColumns(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.loadDBProposals(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.populate(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProposalFactory.getDBObjectProposals(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLParserCompletionEngine.getProposals(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLParserCompletionEngine.computeProposals(Unknown
Source)
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProcessor.computeCompletionProposals(Unknown
Source)
org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:354)
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
org.eclipse.equinox.launcher.Main.run(Main.java:1173)
org.eclipse.equinox.launcher.Main.main(Main.java:1148)


Li huang [Sybase] Posted on 2009-04-07 09:06:38.0Z
Message-ID: <49DB179C.1060601@sybase.com>
From: "Li huang [Sybase]" <lihuang@sybase.com>
Reply-To: lihuang@sybase.com
Organization: Sybase Software Co., Ltd
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
To: Michal Dobisek <michal.dobisek@gmail.com>
Subject: Re: freezing UI
References: <49d4a840$1@forums-1-dub>
In-Reply-To: <49d4a840$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 7 Apr 2009 02:06:38 -0700
X-Trace: forums-1-dub 1239095198 10.22.241.152 (7 Apr 2009 02:06:38 -0700)
X-Original-Trace: 7 Apr 2009 02:06:38 -0700, vip152.sybase.com
Lines: 137
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:840
Article PK: 1088530

Hi, Michal:

WorkSpace 2.1.2 which will be released this year will have some performance enhancements including content assist.

Michal Dobisek wrote:
> Hi,
>
> when working with Workspace 2.1, the application sometimes stop
> responding for a while (could be 10seconds, but even more than a
> minute). The problem seems to occur when I am in SQL editor and the
> application starts doing something to init content assist. I.e. when I
> write
>
> select * from |
> or
> select * from Table where f|
>
> (| is the cursor). I enabled JMX and took a stack trace during one of
> the freezes. I am pasting it at the end of the post. It seems like some
> server call is done right from the GUI thread and for some reason it
> takes long.
>
> Is there any chance to have this bug fixed? It's quite annoying.
>
> Thanks,
>
> Michal
>
>
> Stack trace (thread main):
> java.net.SocketInputStream.socketRead0(Native Method)
> java.net.SocketInputStream.read(SocketInputStream.java:129)
> com.sybase.jdbc3.timedio.RawDbio.reallyRead(Unknown Source)
> com.sybase.jdbc3.timedio.Dbio.doRead(Unknown Source)
> com.sybase.jdbc3.timedio.InStreamMgr.a(Unknown Source)
> com.sybase.jdbc3.timedio.InStreamMgr.doRead(Unknown Source)
> com.sybase.jdbc3.tds.TdsProtocolContext.getChunk(Unknown Source)
> com.sybase.jdbc3.tds.PduInputFormatter.a(Unknown Source)
> com.sybase.jdbc3.tds.PduInputFormatter.read(Unknown Source)
> com.sybase.jdbc3.tds.TdsInputStream.read(Unknown Source)
> com.sybase.jdbc3.tds.TdsInputStream.readUnsignedByte(Unknown Source)
> com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
> com.sybase.jdbc3.tds.Tds.dynamicDeallocate(Unknown Source)
> com.sybase.jdbc3.jdbc.SybPreparedStatement.deallocateDynamic(Unknown
> Source)
> com.sybase.jdbc3.jdbc.SybStatement.close(Unknown Source)
> com.sybase.jdbc3.jdbc.SybStatement.close(Unknown Source)
> org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogUtils.cleanupJDBCResouce(Unknown
> Source)
> org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogColumn.loadColumnInfo(Unknown
> Source)
> org.eclipse.datatools.enablement.ase.catalog.SybaseASECatalogColumn.isNullable(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposal.<init>(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposal.<init>(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.loadColumns(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.loadDBProposals(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLDBProposalsService.populate(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProposalFactory.getDBObjectProposals(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLParserCompletionEngine.getProposals(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLParserCompletionEngine.computeProposals(Unknown
> Source)
> org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProcessor.computeCompletionProposals(Unknown
> Source)
> org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
>
> org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
>
> org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
>
> org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
>
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
> org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
>
> org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:354)
>
> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
>
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
> org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
> org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
>
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> java.lang.reflect.Method.invoke(Method.java:585)
> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
> org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
> org.eclipse.equinox.launcher.Main.run(Main.java:1173)
> org.eclipse.equinox.launcher.Main.main(Main.java:1148)

--
Thanks and regards,

Daniel(Li) Huang [Sybase]

Sybase
Sybase Software (China) Co., Ltd
Room 1202-1203, Building One,
Zhangjiang Semiconductor Industry Park
3000 Longdong Avenue
Pudong, Shanghai 201203
Tel 8621-38657420
Email: lihuang@sybase.com


Michal Dobisek Posted on 2009-04-07 11:38:39.0Z
From: Michal Dobisek <michal.dobisek@gmail.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
Subject: Re: freezing UI
References: <49d4a840$1@forums-1-dub> <49DB179C.1060601@sybase.com>
In-Reply-To: <49DB179C.1060601@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49db3b3f$1@forums-1-dub>
Date: 7 Apr 2009 04:38:39 -0700
X-Trace: forums-1-dub 1239104319 10.22.241.152 (7 Apr 2009 04:38:39 -0700)
X-Original-Trace: 7 Apr 2009 04:38:39 -0700, vip152.sybase.com
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:841
Article PK: 1088497

Hi Li,

thanks for information. I have one more point, when the UI freezes -
when the executed SQL produces lots of output (using prints, or i.e. set
statistics time on), the UI freezes because of some calculations in Text
control take too long. Is this already known issue or should I report it
with stacktrace?

Thanks, Michal

Li huang [Sybase] wrote:
> Hi, Michal:
>
> WorkSpace 2.1.2 which will be released this year will have some
> performance enhancements including content assist.


Li huang [Sybase] Posted on 2009-04-14 11:22:34.0Z
Message-ID: <49E471F9.5090503@sybase.com>
From: "Li huang [Sybase]" <lihuang@sybase.com>
Reply-To: lihuang@sybase.com
Organization: Sybase Software Co., Ltd
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
To: Michal Dobisek <michal.dobisek@gmail.com>
Subject: Re: freezing UI
References: <49d4a840$1@forums-1-dub> <49DB179C.1060601@sybase.com> <49db3b3f$1@forums-1-dub>
In-Reply-To: <49db3b3f$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 14 Apr 2009 04:22:34 -0700
X-Trace: forums-1-dub 1239708154 10.22.241.152 (14 Apr 2009 04:22:34 -0700)
X-Original-Trace: 14 Apr 2009 04:22:34 -0700, vip152.sybase.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:842
Article PK: 1088498

Hi, Michal:

Do you mean SQL Result view for this issue? Is there any exception in Error Log view?

Michal Dobisek wrote:
> Hi Li,
>
> thanks for information. I have one more point, when the UI freezes -
> when the executed SQL produces lots of output (using prints, or i.e. set
> statistics time on), the UI freezes because of some calculations in Text
> control take too long. Is this already known issue or should I report it
> with stacktrace?
>
> Thanks, Michal
>
> Li huang [Sybase] wrote:
>> Hi, Michal:
>>
>> WorkSpace 2.1.2 which will be released this year will have some
>> performance enhancements including content assist.

--
Thanks and regards,

Daniel(Li) Huang [Sybase]

Sybase
Sybase Software (China) Co., Ltd
Room 1202-1203, Building One,
Zhangjiang Semiconductor Industry Park
3000 Longdong Avenue
Pudong, Shanghai 201203
Tel 8621-38657420
Email: lihuang@sybase.com


Michal Dobisek Posted on 2009-04-14 12:51:01.0Z
From: Michal Dobisek <michal.dobisek@gmail.com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
Subject: Re: freezing UI
References: <49d4a840$1@forums-1-dub> <49DB179C.1060601@sybase.com> <49db3b3f$1@forums-1-dub> <49E471F9.5090503@sybase.com>
In-Reply-To: <49E471F9.5090503@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49e486b5@forums-1-dub>
Date: 14 Apr 2009 05:51:01 -0700
X-Trace: forums-1-dub 1239713461 10.22.241.152 (14 Apr 2009 05:51:01 -0700)
X-Original-Trace: 14 Apr 2009 05:51:01 -0700, vip152.sybase.com
Lines: 78
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:843
Article PK: 1088499

Hi Li,

yes, I mean the SQL Results view. There are no new entries in the error
log durin g the freeze. I took some time to prepare more info for you.
Take for instance this code (serves just as an example of code, which
generates lots of output):

set statistics time on
declare
@runtime int,
@starttime datetime,
@endtime datetime,
@duration int

select
@runtime = 300,
@starttime = getdate(),
@duration = 0

while @duration < @runtime
begin
select @endtime = getdate()
select @duration = datediff(ms, @starttime, @endtime)
end

Once you have result of this query in your result history, just
selecting it causes Workbench to freeze for some time (~30secs for me).
Most of the time seems to be consumend by the StyledText.setText (see
sample stack trace below). Similar freeze happens during the execution
of such a verbose query.

Regards,

Michal

Sample stack trace taken during the freeze:
org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1212)
org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:841)
org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:648)
org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:201)
org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:219)
org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:6319)
org.eclipse.swt.custom.StyledText.reset(StyledText.java:6312)
org.eclipse.swt.custom.StyledText.handleTextSet(StyledText.java:5365)
org.eclipse.swt.custom.StyledText$6.textSet(StyledText.java:4783)
org.eclipse.jface.text.DefaultDocumentAdapter.fireTextSet(DefaultDocumentAdapter.java:364)
org.eclipse.jface.text.DefaultDocumentAdapter.documentChanged(DefaultDocumentAdapter.java:287)
org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:696)
org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:673)
org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:658)
org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:723)
org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1117)
org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1098)
org.eclipse.jface.text.DefaultDocumentAdapter.setText(DefaultDocumentAdapter.java:258)
org.eclipse.swt.custom.StyledText.setText(StyledText.java:7934)
org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.createTabForResultItem(Unknown
Source)
org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.showResultsDetail(Unknown
Source)
org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.showDetail(Unknown
Source)
org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6$1$1.run(Unknown
Source)
org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:158)
org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:118)
org.eclipse.swt.widgets.Display.syncExec(Display.java:4097)
org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6$1.run(Unknown
Source)
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6.selectionChanged(Unknown
Source)

Li huang [Sybase] wrote:
> Hi, Michal:
>
> Do you mean SQL Result view for this issue? Is there any exception in
> Error Log view?
>


Li huang [Sybase] Posted on 2009-04-28 01:54:30.0Z
Message-ID: <49F661D6.6000001@sybase.com>
From: "Li huang [Sybase]" <lihuang@sybase.com>
Reply-To: lihuang@sybase.com
Organization: Sybase Software Co., Ltd
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
Newsgroups: sybase.public.workspace.general
To: Michal Dobisek <michal.dobisek@gmail.com>
Subject: Re: freezing UI
References: <49d4a840$1@forums-1-dub> <49DB179C.1060601@sybase.com> <49db3b3f$1@forums-1-dub> <49E471F9.5090503@sybase.com> <49e486b5@forums-1-dub>
In-Reply-To: <49e486b5@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 27 Apr 2009 18:54:30 -0700
X-Trace: forums-1-dub 1240883670 10.22.241.152 (27 Apr 2009 18:54:30 -0700)
X-Original-Trace: 27 Apr 2009 18:54:30 -0700, vip152.sybase.com
Lines: 117
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.workspace.general:847
Article PK: 1088501

Hi, Michal:

Sorry for replying it late.

We followed your example and adjust @runtime = 100000. When switching it in SQL Result view, the consuming time is less than 20 seconds in
WorkSpace 2.1.2.

As we did some performance enhancements including SQL Result view in WorkSpace 2.1.2, I suggest you can try it in WorkSpace 2.1.2 when WorkSpace
2.1.2 is released.

Michal Dobisek wrote:
> Hi Li,
>
> yes, I mean the SQL Results view. There are no new entries in the error
> log durin g the freeze. I took some time to prepare more info for you.
> Take for instance this code (serves just as an example of code, which
> generates lots of output):
>
> set statistics time on
> declare
> @runtime int,
> @starttime datetime,
> @endtime datetime,
> @duration int
>
> select
> @runtime = 300,
> @starttime = getdate(),
> @duration = 0
>
> while @duration < @runtime
> begin
> select @endtime = getdate()
> select @duration = datediff(ms, @starttime, @endtime)
> end
>
> Once you have result of this query in your result history, just
> selecting it causes Workbench to freeze for some time (~30secs for me).
> Most of the time seems to be consumend by the StyledText.setText (see
> sample stack trace below). Similar freeze happens during the execution
> of such a verbose query.
>
> Regards,
>
> Michal
>
> Sample stack trace taken during the freeze:
> org.eclipse.swt.graphics.TextLayout.getLineCount(TextLayout.java:1212)
> org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:841)
>
> org.eclipse.swt.custom.StyledTextRenderer.getTextLayout(StyledTextRenderer.java:648)
>
> org.eclipse.swt.custom.StyledTextRenderer.calculate(StyledTextRenderer.java:201)
>
> org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:219)
>
> org.eclipse.swt.custom.StyledText.resetCache(StyledText.java:6319)
> org.eclipse.swt.custom.StyledText.reset(StyledText.java:6312)
> org.eclipse.swt.custom.StyledText.handleTextSet(StyledText.java:5365)
> org.eclipse.swt.custom.StyledText$6.textSet(StyledText.java:4783)
> org.eclipse.jface.text.DefaultDocumentAdapter.fireTextSet(DefaultDocumentAdapter.java:364)
>
> org.eclipse.jface.text.DefaultDocumentAdapter.documentChanged(DefaultDocumentAdapter.java:287)
>
> org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:696)
>
> org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:673)
>
> org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:658)
>
> org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:723)
>
> org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1117)
> org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1098)
> org.eclipse.jface.text.DefaultDocumentAdapter.setText(DefaultDocumentAdapter.java:258)
>
> org.eclipse.swt.custom.StyledText.setText(StyledText.java:7934)
> org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.createTabForResultItem(Unknown
> Source)
> org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.showResultsDetail(Unknown
> Source)
> org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection.showDetail(Unknown
> Source)
> org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6$1$1.run(Unknown
> Source)
> org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:158)
> org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:118)
> org.eclipse.swt.widgets.Display.syncExec(Display.java:4097)
> org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6$1.run(Unknown
> Source)
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
> org.eclipse.datatools.sqltools.result.internal.ui.view.ResultHistorySection$6.selectionChanged(Unknown
> Source)
>
> Li huang [Sybase] wrote:
>> Hi, Michal:
>>
>> Do you mean SQL Result view for this issue? Is there any exception in
>> Error Log view?
>>

--
Thanks and regards,

Daniel(Li) Huang [Sybase]
WorkSpace Database Development Tooling Dev Manager

Sybase
Sybase Software (China) Co., Ltd
Room 1202-1203, Building One,
Zhangjiang Semiconductor Industry Park
3000 Longdong Avenue
Pudong, Shanghai 201203
Tel 8621-38657420
Email: lihuang@sybase.com