Perfomance issue with Entity Framework 6.0 - entity-framework

get performance issue with entity framework(vs6.0).
In my website, get performance with one page (this page have long logic with database).
What is I have checked?
Case
That page is working fine with localhost. (Take time for page loading 7 to 8 seconds)
But it is working very slow with live. (Take time for page loading 1.30 to 2 minute). (Some time it is working fine with live and take time for page loading 11 to 15 second)
All other page working fine but there is not long logic with database.
If I compare all other page loading time with local and live then not got more difference.
Same data on database on live and local
Any one have idea Why it is working very slow some time?

found issue of performance in my case. Not used Dispose() any object during process with Entity framework object.

Related

Huge CoreData migration in swift

I have a CoreData sqlite files *.sqlite *.sqlite-shm *.sqlite-wal in a zip format from my previous application version. The file is almost few hundred MBs.
In recent version, I have done some changes in the database schema i-e adding few new fields etc.
In Importing, I am simply replacing the current database by old database and making the user to restart application, which is crude. It does work however it causes 2 issues
1- It takes a lot of time on splash screen hanging the application.
2- If the database is big enough, the hanging time passes the Timeout
of Application and closes the application automatically.
What is the better way of importing database into core data saved in Documents as zip file.
First detect whether you are doing a migration. If you are, then display a ViewController with a spinner that explains what you are you doing ("please wait while we optimize the app"). When the database migration is done, the load your regular viewController.
This exact issue is discussed in this lecture: Core Data Potpourri (Paul Goracke, February 13, 2014) around 58:00. While the lecture is a bit dated (it was made before NSPersistentContainer) it is still one of the best I have ever seen and it is worthwhile to watch the entire video.

Domain updating in grails 3.2.9

I have a problem after upgrading from grails 2.3.11 to version 3.2.9.
We have changed what was needed and almost everything works great. But we still have only one problem.
Some action in app have this pattern:
On click in UI there is ajax request which which updates/inserts data into DB.
After success there is callback with another ajax which retrieves updated/new data.
Sometimes (very rarely), second ajax gets old data(of course after another request, data is updated). Database did not have enough time to save the data ? ;)
In grails 2 this never happened.
We use postgres 8.4, but after update to 9.6, problem still occurs. Changing jdbc driver didn't help too.
To reproduce this, I have created a simple app. I added some records to the DB and created 2 actions. One action adds a domain and returns a new id, the second gets data after the insert (there is only one assert which checks if a domain with the right id was created in the DB).
When I have postgres DB on a local, fast machine, the problem occurred very, very rarely, but on the local network, a slow machine causes the problem to appear more frequently.
The problem did not occurr with the default H2 database.
https://github.com/kuchar90/grails3.2Test
Is this normal behavior? Do you have an idea where to look for the reason for this issue?

website load time differs for more than 2 second on various try

I am working on to figure out the performance bottleneck of a website. I am using the chrome empty cache and hard reload option and hitting it using the incognito mode(with no extension enabled).
For determining the page load time, using the network tab of chrome tools and it reports huge variation when i hit same page using the same(empty cache and hard reload) option.
For ex:-
Below is the first hit, which shows load time is 8.2 sec with 25 requests and 477KB data :-
Just after when i again hit(2nd hit), i get the same no of request and size but load time increases to 9.25 sec.
And in 3rd hit , it reduces to just 6.89 second.
Now, my question is that i am doing the same thing, then why the load time varies a lot.
Maybe you have some requests (styles, scripts, img) to 3rd party servers which have different time for download each time ( because 3rd party server may be more heavy loaded in that specific moment).
If thats the case and your code depends (on load event) on them - it is pretty possible that you received different page load times.

any significance in fiddler to ‘Aggregate Session’ time and Sequence (clock) time being very different?

We have a ASP.NET C# website (not MVC) that consists of a half dozen Pages. One of them is very large, consisting of several 3rd party controls (from Telerik, FarPointSpread and a few from the Ajax Control Toolkit) and about 15,000 lines of code.
This particular page, which is invoked by way of a response.redirect command from a prior page, has always loaded very slowly. Once we click on the button it takes quite a while (perhaps 10 seconds) for the new page to appear. While this is not especially acceptable what is much worse is that, when the new page actually does load, it takes quite a bit more time (perhaps yet another 10 seconds) for the various elements of the page (drop down lists, buttons, scroll bars and the like) to become available to the user.
Recently we started to use Fiddler to try and get some statistical information to help us improve on this. One of my associates, who has access to one of our Web Servers, has been using fiddler to monitor the performance of this program. His findings are:
• Our compression routines seem to be working. Much of the static information required by the program is coming from cache.
• Some of the images come back with a return code of 401, but these images are eventually made available.
• Fiddler reports an ‘Aggregate Session’ time of approximately 4 seconds.
• It also reports a ‘Sequence (clock)’ time of approximately 16 seconds.
• When we use fiddler to acquire statistics for any of the other programs (which are all much smaller and don’t have the issues this larger program has) we do not see the large difference between the ‘Aggregate Session’ time and the ‘Sequence (clock)’ time
Sequence time being longer than the aggregate session time means that the client is idle for some period of time and not making requests, perhaps due to slow-running JavaScript on the client.
The 401s are from HTTP Authentication requests from the server.

How to prevent Crystal webserver refetching data on each page

We're using Crystal 11 through their webserver. When we run a report, it does the Sql query and displays the first page of the report in the Crystal web reportviewer.
When you hit the next page button, it reruns the Sql query and displays the next page.
How do we get the requerying of the data to stop?
We also have multiple people running the same reports at the same time (it is a web server after all), and we don't want to cache data between different instances of the same report, we only want to cache the data in each single instance of the report.
The reason to have pagination is not only a presentation concern. With pagination the single most important advantage is lazy loading of data - so that in theory, depending on given filters, you load only what you need.
Just imagine if you have millions of records in your db and you load all of them. First of all is gonna be a hell of a lot slower, second you're fetching a lot of stuff you don't really need. All the web models nowadays are based on lazy loading rather than bulk loading. Think about Google App Engine: you can't retrieve more than 1000 records in a given transaction from the Google Datastore - and you know that if you'll only try and display them your browser will die.
I'll close with a question - do you have a performance issue of any kind?
If so, you probably think you'll make it better but it's probably not the case, because you'll reduce the load on the server but each single query will be much more resource consuming.
If not my advice is to leave it alone! :)