473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Performance degradation in SelectNodes

I am observed behaviour similar to 2003 topic ".NET & XML -
SelectNode() is wasting time :-(".

I have big Windows forms application written in C# on .NET 1.1. The
application becomes slower as it runs. I tend to attribute it to
memory. Profiler shows SelectNodes and SelectSingleNode as functions
that become considerably slower over time. Initially it takes ~0.001
sec, and these calls become ~0.3 seconds.

App uses XML DOM as cache, and it is not large, probaly ~10K. As app
runs it does not increase, so slowness is not attributed to the growing
size of XML.

Profiling shows, that Select... functions slow down because of calls to
CreateNavigator, that calls DocumentXPathNavigator, that calls
CreateAttribute. (I looked in the rotor code, it is namespace for xml).
That CreateAttribute call is very slow, maybe because of memory
problems.

I partially worked around by caching XPath navigator, but it does not
sound right to create cache of XPathNavigators...

I cannot switch to XPathDocument, because XML is writable, and I need
flexibility of DOM. What I see does not seem like DOM limitation, but
rather .NET bug or at least glitch: in rotor code that attribute is
read-only, and it is not added to the tree.

I created a smaller single threaded console test with some memory
poluting (string concatination), and it does show slowness from time to
time, but not always.
My UI app is multithreaded, so it is possible that DOM is accessed by
2-3 threads. Could it be the problem? Is XmlDocument locked during
CreateAttribute call?

I appreciate any help or hints!

Thank you
Dima

Nov 12 '05 #1
0 1022

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jason Heyes | last post by:
What can I do to circumvent the performance degradation associated with dynamic allocation and small objects? Thanks.
0
by: Andrew Mayo | last post by:
This problem was discovered with MSDE2000 SP2 and under WinXP SP2. We are unsure whether it is more widespread as it has only been seen on one machine to date. The problem is related to name...
6
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
3
by: adsheehan | last post by:
Hi all, Wondering if a GIL lock/unlock causes a re-schedule/contect swap when embedding Python in a multi-threaded C/C++ app on Unix ? If so, do I have any control or influence on this...
6
by: florian | last post by:
Hello, we are running DB2 UDB EEE Version 7.2 Fixpack 12 on a two machine Windows 2000 Advanced Server Cluster in a dss environment. Some dynamic sql statements for etl processes and even some...
7
by: Kevin Wan | last post by:
Hello, Would anyone explain why there is a consistent large performance degradation with the dumb copy? Thanks in advance! array_copy_dumb.c: /* array_copy_dumb.c */
22
by: Kevin Murphy | last post by:
I'm using PG 7.4.3 on Mac OS X. I am disappointed with the performance of queries like 'select foo from bar where baz in (subquery)', or updates like 'update bar set foo = 2 where baz in...
6
by: Joachim Worringen | last post by:
I need to process large lists (in my real application, this is to parse the content of a file). I noticed that the performance to access the individual list elements degrades over runtime. This...
30
by: galiorenye | last post by:
Hi, Given this code: A** ppA = new A*; A *pA = NULL; for(int i = 0; i < 10; ++i) { pA = ppA; //do something with pA
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.