Configurable Traceoutput
------------------------

                 Key: DNET-431
                 URL: http://tracker.firebirdsql.org/browse/DNET-431
             Project: .NET Data provider
          Issue Type: New Feature
          Components: ADO.NET Provider
    Affects Versions: 2.7.5
         Environment: Visual Studio 2010
            Reporter: Baldur Fürchau
            Assignee: Jiri Cincura


In the new versions you using many trace output to the debug window of Visual 
Studion 2010.
This slows down dramatically the entire application.
Please make this feature configurable, so i can turn off or turn on this trace.

I have downloaded the actual source 2.7.5 and made a little modification:

        public static class TraceHelper
        {
                public const string Name = "FirebirdSql.Data.FirebirdClient";
                public const string ConditionalSymbol = "TRACE";


                static TraceSource _instance;
        static bool _Activated = true;

        public static bool TraceActivated
        {
            get { return _Activated;}
            set
            {
                _Activated = value;
            }
        }

                static TraceHelper()
                {
                        _instance = new TraceSource(Name, SourceLevels.All);
                }

                public static void Trace(TraceEventType eventType, string 
format, params object[] args)
                {
            if (_Activated == true) { 
                            _instance.TraceEvent(TraceEventType.Information, 
default(int), format, args);
                            _instance.Flush();
            }
                }
        }


No i can in my application simply set

        FirebirdSql.Data.Common.TraceHelper.TraceActivated = False

On a simple ExecuteReader the execution time is reduced from 0.87 seconds to 
0.12 seconds!
The reason is, that ADO.NET executes for each column a new SQL, that will also 
be traced to the output.

It would by nice, to have this feature automaticly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to