FbParameterCollection use slow List<FbParameter> to find Parameters by Name ---------------------------------------------------------------------------
Key: DNET-1040 URL: http://tracker.firebirdsql.org/browse/DNET-1040 Project: .NET Data provider Issue Type: Improvement Components: ADO.NET Provider Affects Versions: 7.10.1.0 Environment: Windows 10 20H2, Visual Studio 2019, Firebird 3.0 Reporter: Baldur Fürchau Assignee: Jiri Cincura If i work with named FbParameter, Upadates/Inserts slow down. The reason seams to be, the often is used _parametes.IndexOf() or _Parameter.Contains(). The ILIst is slow in this functions and if you have a lot of parameters, assigning values needs too much time before the real insert happens. When you use a FbDataAdapter with generated Update/Delete/Insert-Statements a lot of namend parameters are created. Why do you not use a Dictionary<String, int> and a Dictionary<FbParameter, int> to find the parameter depending on object or name? With a FbDataadapter i can't optimize this by myself, because the created parameters in the list for update is twace of column count, one for old value and one for new value to prevent unwanted updates (framework standard). As a workaround for my inserts, i hold my own Dictionary<> to find namend parameters to assign values for the next ExecuteNonQuery and store unnamed parameters in the command. I can insert 2000 - 8000 Rows per second, depending on count of columns, with named parameters its only 500 - 2500. -- 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 _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider