slow

How to change slow parametrized inserts into fast bulk copy (even from memory)

I had someting like this in my code (.Net 2.0, MS SQL) SqlConnection connection = new SqlConnection(@"Data Source=localhost;Initial Catalog=DataBase;Integrated Security=True"); connection.Open(); SqlCommand cmdInsert = connection.CreateCommand(); SqlTransaction sqlTran = connection.BeginTransaction(); cmdInsert.Transaction = sq...

In a WPF ListBox with more than 1000 Image Items the Zoom Images become slow

I met a problem when deveoping a photo viewer application. I use ListBox to Show Images, which is contained in a ObservableCollection. I bind the ListBox's ItemsSource to the ObservableCollection. <DataTemplate DataType="{x:Type modeldata:ImageInfo}"> <Image Margin="6" Source="{Binding Thumbnail}" ...

gdi+ Graphics::DrawImage really slow~~

I am using a GDI+ Graphic to draw a 4000*3000 image to screen, but it is really slow. It takes about 300ms. I wish it just occupy less than 10ms. Bitmap *bitmap = Bitmap::FromFile("XXXX",...); //-------------------------------------------- // this part takes about 300ms, terrible! int width = bitmap->GetWidth(); int height = bitmap->...

Why does Log4Net run so slow in my Windows Service?

I have a windows service that uses log4net. We noticed that the service in question was running painfully slow so we attached a debugger to it and stepped through. It appears that each time it tries to write an entry to the log via log4net that it takes anywhere from 10 to 30 seconds before the next line of code can execute. Obviously th...

Sharepoint site takes a while to load first thing in the morning

Our team has built a site using Sharepoint and a few custom webparts. We've noticed that the site takes a while to load when first accessing the site in the morning. Subsequent accesses are fine. We suspect that Sharepoint is reindexing its lists, etc. Has anyone else seen this problem with Sharepoint? Does anyone have a suggested ...

Using OOP for combining lots of functions (sort of namespace) in PHP?

Hi, I am working with PHP and I am wondering how bad practise it is to combine lots of funtions into a class. I am aware of it's not the purpose of classes, but the reason why I would do this is to provide a namespace. How big impact does it make to initiate let's say 10 classes at the execution of a PHP script isntead of let's say 2 or...

glGetError hangs for several seconds

I am developing an OpenGL application and I am seeing some strange things happen. The machine I am testing with is equipped with an NVidia Quadro FX 4600 and it is running RHEL WS 4.3 x86_64 (kernel 2.6.9-34.ELsmp). I've stepped through the application with a debugger and I've noticed that it is hanging on OpenGL calls that are receivin...

Subversion Ant update task taking forever

I've downloaded the svntask for ant from tigris.org, so it is the "official" one. I have a simple task to update my entire project <target name="prepare"> <svn username="user" password="pass"> <update> <fileset dir="."/> </update> </svn> </target> Running this task took about 2 hours. Running a svn update on the comm...

(ASP.NET MVC) Will this make my webapp slow if I use GlobalResources for localization only?

I have a multilingual site and I want to use Global resources only, I was wondering if it could cause my site runs slower? ...

opengl slow on texture blit

I called this function once per frame and it took my FPS from >400 to 33. Why? sw blt(const PtRect *dstRect, Texture *src, const PtRect *srcRect, RenderDevice::bltFlags flags=RenderDevice::bltDefault) { assert(src); GL_Texture *glsrc = dynamic_cast<GL_Texture*>(src); if (glsrc == 0) return -1; PtRect srcRect2(0, 0, src->width, sr...

Why is F10 so slow in VS2008 ?

Question says it all really - a lot slower than VS2005, with a noticeable (0.5 sec) delay on each key press. It makes stepping through code a pain. Matt ...

.NET C# drawing slowly

Hi all, I have a problem drawing something quickly in .NET. I don't think that any thing in particular should take much time, but on every machine I've tried it on, I get serious issues. This is implemented in vs2008 .NET, using C# (with some stuff in C++, but nothing relevant to the drawing). I have three screens, and the user shou...

WinForms ReportViewer: slow initial rendering

UPDATE 2.4.2010 Yeah, this is an old question but I thought I would give an update. So, I'm working with the ReportViewer again and it's still rendering slowly on the initial load. The only difference is that the SQL database is on the reporting server. UPDATE 3.16.2009 I have done profiling and it's not the SQL that is making the Re...

Telerik RadGrid working examples

I'm looking for some examples of production websites that currently use the Telerik Rad Grid. I'd really like to see some real world scenarios in action, other than the Telerik RadGrid demo. Does anyone know of any websites that use it? ...

Why is Linq to Xml so slow on Vista?

I have an app that loads some XML docs into memory then runs various queries against it using Linq. The app runs fine on the live server (Windows Server 2003) and under Visual Studio 2008 on XP. But on my Vista laptop (4gb RAM, 2GHz CPU) all the Linq queries run really really slow. What should take a couple of milliseconds instead takes...

MySQL "SET NAMES" near the top of the slow query log

On a recently launched site, I noticed that, well over the actual heavy queries on the site, the most costly request, out of several million queries, is actually SET NAMES, which clocks over 2.3 seconds on average, while various multi-join union queries are well below 2 seconds. In the end, this places it near the top of the slow query l...

What's wrong with this query? EXPLAIN looks fine to me...

I'm going through an application and trying to optimize some queries and I'm really struggling with a few of them. Here's an example: SELECT `Item` . * , `Source` . * , `Keyword` . * , `Author` . * FROM `items` AS `Item` JOIN `sources` AS `Source` ON ( `Item`.`source_id` = `Source`.`id` ) JOIN `authors` AS `Author` ON ( `Item`.`author...

Showing tab with lots of ComboBox controls is slow with WinForms

I have set up a dialog with several tabs. One of these contains twenty combo boxes, each with over 100 items, added like this : foreach (var x in collection) { string text = FormatItem (x); combo.Items.Add (text); } so there is nothing fancy at all with the items. They are plain strings and the combo boxes get filled when the ...

Tips for improving this slow mysql query?

I'm using a query which generally executes in under a second, but sometimes takes between 10-40 seconds to finish. I'm actually not totally clear on how the subquery works, I just know that it works, in that it gives me 15 rows for each faverprofileid. I'm logging slow queries and it's telling me 5823244 rows were examined, which is odd...

Tips for using vim over a slow connection?

I'm using vim over a slow connection and it is a little painful. Is there anything I can do in vim to alleviate the pain? ...