This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | SQL file opened by openfile.DefaultOpenFileImpl$3.run() queries its encoding in EDT | ||
---|---|---|---|
Product: | platform | Reporter: | Vladimir Voskresensky <vv159170> |
Component: | Data Systems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | NEW --- | ||
Severity: | normal | CC: | alexvsimon, almircampos, AvanOsch, azinkey, issues, sarmiste, scriptoid |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 197942 |
Attachments: |
nps snapshot
nps snapshot nps snapshot |
Description
Vladimir Voskresensky
2013-01-24 11:38:21 UTC
Created attachment 130575 [details]
nps snapshot
Created attachment 130722 [details]
nps snapshot
Created attachment 130736 [details]
nps snapshot
Opening .SQL file
SQL file is not run in EDT, only opened. The problem is that the encoding has to be detected during opening of the file, and in some cases, it's needed to access filesystem to do so. Method org.openide.actions.OpenAction.performAction() must be called from EDT, so DefaultOpenFileImpl cannot run it in background. Some important part of the snapshot: org.netbeans.modules.openfile.DefaultOpenFileImpl$3.run() 34 382 ms org.openide.actions.OpenAction.performAction() 34 382 ms org.openide.text.DataEditorSupport.openDocument() 34 366 ms org.netbeans.api.queries.FileEncodingQuery.getEncoding() 34 319 ms org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner() 34 319 ms org.netbeans.api.project.ProjectManager.createProject() 34 319 ms java.io.File.exists() 31 293 ms java.io.WinNTFileSystem.getBooleanAttributes[native]() 31 293 ms Reassigning to Platform/Text. Please evaluate. Thank you. 33 reports => P2 The DataEditorSupport.openDocument() uses "charsets" cache which pre-reads the charset synchronously before the actual loading (in a background thread) takes place. I have tried to remove the caching but several tests failed and I'm not sure I understand all the context and consequences so passing to platform/datasystems for evaluation. (In reply to Alexander Simon from comment #5) > 33 reports => P2 Unrelated duplicates were moved to bug 242012. |