Search Results

Search found 958 results on 39 pages for 'dispose'.

Page 16/39 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • ANTS Memory Profiler 7.0 Review

    - by Michael B. McLaughlin
    (This is my first review as a part of the GeeksWithBlogs.net Influencers program. It’s a program in which I (and the others who have been selected for it) get the opportunity to check out new products and services and write reviews about them. We don’t get paid for this, but we do generally get to keep a copy of the software or retain an account for some period of time on the service that we review. In this case I received a copy of Red Gate Software’s ANTS Memory Profiler 7.0, which was released in January. I don’t have any upgrade rights nor is my review guided, restrained, influenced, or otherwise controlled by Red Gate or anyone else. But I do get to keep the software license. I will always be clear about what I received whenever I do a review – I leave it up to you to decide whether you believe I can be objective. I believe I can be. If I used something and really didn’t like it, keeping a copy of it wouldn’t be worth anything to me. In that case though, I would simply uninstall/deactivate/whatever the software or service and tell the company what I didn’t like about it so they could (hopefully) make it better in the future. I don’t think it’d be polite to write up a terrible review, nor do I think it would be a particularly good use of my time. There are people who get paid for a living to review things, so I leave it to them to tell you what they think is bad and why. I’ll only spend my time telling you about things I think are good.) Overview of Common .NET Memory Problems When coming to land of managed memory from the wilds of unmanaged code, it’s easy to say to one’s self, “Wow! Now I never have to worry about memory problems again!” But this simply isn’t true. Managed code environments, such as .NET, make many, many things easier. You will never have to worry about memory corruption due to a bad pointer, for example (unless you’re working with unsafe code, of course). But managed code has its own set of memory concerns. For example, failing to unsubscribe from events when you are done with them leaves the publisher of an event with a reference to the subscriber. If you eliminate all your own references to the subscriber, then that memory is effectively lost since the GC won’t delete it because of the publishing object’s reference. When the publishing object itself becomes subject to garbage collection then you’ll get that memory back finally, but that could take a very long time depending of the life of the publisher. Another common source of resource leaks is failing to properly release unmanaged resources. When writing a class that contains members that hold unmanaged resources (e.g. any of the Stream-derived classes, IsolatedStorageFile, most classes ending in “Reader” or “Writer”), you should always implement IDisposable, making sure to use a properly written Dispose method. And when you are using an instance of a class that implements IDisposable, you should always make sure to use a 'using' statement in order to ensure that the object’s unmanaged resources are disposed of properly. (A ‘using’ statement is a nicer, cleaner looking, and easier to use version of a try-finally block. The compiler actually translates it as though it were a try-finally block. Note that Code Analysis warning 2202 (CA2202) will often be triggered by nested using blocks. A properly written dispose method ensures that it only runs once such that calling dispose multiple times should not be a problem. Nonetheless, CA2202 exists and if you want to avoid triggering it then you should write your code such that only the innermost IDisposable object uses a ‘using’ statement, with any outer code making use of appropriate try-finally blocks instead). Then, of course, there are situations where you are operating in a memory-constrained environment or else you want to limit or even eliminate allocations within a certain part of your program (e.g. within the main game loop of an XNA game) in order to avoid having the GC run. On the Xbox 360 and Windows Phone 7, for example, for every 1 MB of heap allocations you make, the GC runs; the added time of a GC collection can cause a game to drop frames or run slowly thereby making it look bad. Eliminating allocations (or else minimizing them and calling an explicit Collect at an appropriate time) is a common way of avoiding this (the other way is to simplify your heap so that the GC’s latency is low enough not to cause performance issues). ANTS Memory Profiler 7.0 When the opportunity to review Red Gate’s recently released ANTS Memory Profiler 7.0 arose, I jumped at it. In order to review it, I was given a free copy (which does not include upgrade rights for future versions) which I am allowed to keep. For those of you who are familiar with ANTS Memory Profiler, you can find a list of new features and enhancements here. If you are an experienced .NET developer who is familiar with .NET memory management issues, ANTS Memory Profiler is great. More importantly still, if you are new to .NET development or you have no experience or limited experience with memory profiling, ANTS Memory Profiler is awesome. From the very beginning, it guides you through the process of memory profiling. If you’re experienced and just want dive in however, it doesn’t get in your way. The help items GAHSFLASHDAJLDJA are well designed and located right next to the UI controls so that they are easy to find without being intrusive. When you first launch it, it presents you with a “Getting Started” screen that contains links to “Memory profiling video tutorials”, “Strategies for memory profiling”, and the “ANTS Memory Profiler forum”. I’m normally the kind of person who looks at a screen like that only to find the “Don’t show this again” checkbox. Since I was doing a review, though, I decided I should examine them. I was pleasantly surprised. The overview video clocks in at three minutes and fifty seconds. It begins by showing you how to get started profiling an application. It explains that profiling is done by taking memory snapshots periodically while your program is running and then comparing them. ANTS Memory Profiler (I’m just going to call it “ANTS MP” from here) analyzes these snapshots in the background while your application is running. It briefly mentions a new feature in Version 7, a new API that give you the ability to trigger snapshots from within your application’s source code (more about this below). You can also, and this is the more common way you would do it, take a memory snapshot at any time from within the ANTS MP window by clicking the “Take Memory Snapshot” button in the upper right corner. The overview video goes on to demonstrate a basic profiling session on an application that pulls information from a database and displays it. It shows how to switch which snapshots you are comparing, explains the different sections of the Summary view and what they are showing, and proceeds to show you how to investigate memory problems using the “Instance Categorizer” to track the path from an object (or set of objects) to the GC’s root in order to find what things along the path are holding a reference to it/them. For a set of objects, you can then click on it and get the “Instance List” view. This displays all of the individual objects (including their individual sizes, values, etc.) of that type which share the same path to the GC root. You can then click on one of the objects to generate an “Instance Retention Graph” view. This lets you track directly up to see the reference chain for that individual object. In the overview video, it turned out that there was an event handler which was holding on to a reference, thereby keeping a large number of strings that should have been freed in memory. Lastly the video shows the “Class List” view, which lets you dig in deeply to find problems that might not have been clear when following the previous workflow. Once you have at least one memory snapshot you can begin analyzing. The main interface is in the “Analysis” tab. You can also switch to the “Session Overview” tab, which gives you several bar charts highlighting basic memory data about the snapshots you’ve taken. If you hover over the individual bars (and the individual colors in bars that have more than one), you will see a detailed text description of what the bar is representing visually. The Session Overview is good for a quick summary of memory usage and information about the different heaps. You are going to spend most of your time in the Analysis tab, but it’s good to remember that the Session Overview is there to give you some quick feedback on basic memory usage stats. As described above in the summary of the overview video, there is a certain natural workflow to the Analysis tab. You’ll spin up your application and take some snapshots at various times such as before and after clicking a button to open a window or before and after closing a window. Taking these snapshots lets you examine what is happening with memory. You would normally expect that a lot of memory would be freed up when closing a window or exiting a document. By taking snapshots before and after performing an action like that you can see whether or not the memory is really being freed. If you already know an area that’s giving you trouble, you can run your application just like normal until just before getting to that part and then you can take a few strategic snapshots that should help you pin down the problem. Something the overview didn’t go into is how to use the “Filters” section at the bottom of ANTS MP together with the Class List view in order to narrow things down. The video tutorials page has a nice 3 minute intro video called “How to use the filters”. It’s a nice introduction and covers some of the basics. I’m going to cover a bit more because I think they’re a really neat, really helpful feature. Large programs can bring up thousands of classes. Even simple programs can instantiate far more classes than you might realize. In a basic .NET 4 WPF application for example (and when I say basic, I mean just MainWindow.xaml with a button added to it), the unfiltered Class List view will have in excess of 1000 classes (my simple test app had anywhere from 1066 to 1148 classes depending on which snapshot I was using as the “Current” snapshot). This is amazing in some ways as it shows you how in stark detail just how immensely powerful the WPF framework is. But hunting through 1100 classes isn’t productive, no matter how cool it is that there are that many classes instantiated and doing all sorts of awesome things. Let’s say you wanted to examine just the classes your application contains source code for (in my simple example, that would be the MainWindow and App). Under “Basic Filters”, click on “Classes with source” under “Show only…”. Voilà. Down from 1070 classes in the snapshot I was using as “Current” to 2 classes. If you then click on a class’s name, it will show you (to the right of the class name) two little icon buttons. Hover over them and you will see that you can click one to view the Instance Categorizer for the class and another to view the Instance List for the class. You can also show classes based on which heap they live on. If you chose both a Baseline snapshot and a Current snapshot then you can use the “Comparing snapshots” filters to show only: “New objects”; “Surviving objects”; “Survivors in growing classes”; or “Zombie objects” (if you aren’t sure what one of these means, you can click the helpful “?” in a green circle icon to bring up a popup that explains them and provides context). Remember that your selection(s) under the “Show only…” heading will still apply, so you should update those selections to make sure you are seeing the view you want. There are also links under the “What is my memory problem?” heading that can help you diagnose the problems you are seeing including one for “I don’t know which kind I have” for situations where you know generally that your application has some problems but aren’t sure what the behavior you have been seeing (OutOfMemoryExceptions, continually growing memory usage, larger memory use than expected at certain points in the program). The Basic Filters are not the only filters there are. “Filter by Object Type” gives you the ability to filter by: “Objects that are disposable”; “Objects that are/are not disposed”; “Objects that are/are not GC roots” (GC roots are things like static variables); and “Objects that implement _______”. “Objects that implement” is particularly neat. Once you check the box, you can then add one or more classes and interfaces that an object must implement in order to survive the filtering. Lastly there is “Filter by Reference”, which gives you the option to pare down the list based on whether an object is “Kept in memory exclusively by” a particular item, a class/interface, or a namespace; whether an object is “Referenced by” one or more of those choices; and whether an object is “Never referenced by” one or more of those choices. Remember that filtering is cumulative, so anything you had set in one of the filter sections still remains in effect unless and until you go back and change it. There’s quite a bit more to ANTS MP – it’s a very full featured product – but I think I touched on all of the most significant pieces. You can use it to debug: a .NET executable; an ASP.NET web application (running on IIS); an ASP.NET web application (running on Visual Studio’s built-in web development server); a Silverlight 4 browser application; a Windows service; a COM+ server; and even something called an XBAP (local XAML browser application). You can also attach to a .NET 4 process to profile an application that’s already running. The startup screen also has a large number of “Charting Options” that let you adjust which statistics ANTS MP should collect. The default selection is a good, minimal set. It’s worth your time to browse through the charting options to examine other statistics that may also help you diagnose a particular problem. The more statistics ANTS MP collects, the longer it will take to collect statistics. So just turning everything on is probably a bad idea. But the option to selectively add in additional performance counters from the extensive list could be a very helpful thing for your memory profiling as it lets you see additional data that might provide clues about a particular problem that has been bothering you. ANTS MP integrates very nicely with all versions of Visual Studio that support plugins (i.e. all of the non-Express versions). Just note that if you choose “Profile Memory” from the “ANTS” menu that it will launch profiling for whichever project you have set as the Startup project. One quick tip from my experience so far using ANTS MP: if you want to properly understand your memory usage in an application you’ve written, first create an “empty” version of the type of project you are going to profile (a WPF application, an XNA game, etc.) and do a quick profiling session on that so that you know the baseline memory usage of the framework itself. By “empty” I mean just create a new project of that type in Visual Studio then compile it and run it with profiling – don’t do anything special or add in anything (except perhaps for any external libraries you’re planning to use). The first thing I tried ANTS MP out on was a demo XNA project of an editor that I’ve been working on for quite some time that involves a custom extension to XNA’s content pipeline. The first time I ran it and saw the unmanaged memory usage I was convinced I had some horrible bug that was creating extra copies of texture data (the demo project didn’t have a lot of texture data so when I saw a lot of unmanaged memory I instantly figured I was doing something wrong). Then I thought to run an empty project through and when I saw that the amount of unmanaged memory was virtually identical, it dawned on me that the CLR itself sits in unmanaged memory and that (thankfully) there was nothing wrong with my code! Quite a relief. Earlier, when discussing the overview video, I mentioned the API that lets you take snapshots from within your application. I gave it a quick trial and it’s very easy to integrate and make use of and is a really nice addition (especially for projects where you want to know what, if any, allocations there are in a specific, complicated section of code). The only concern I had was that if I hadn’t watched the overview video I might never have known it existed. Even then it took me five minutes of hunting around Red Gate’s website before I found the “Taking snapshots from your code" article that explains what DLL you need to add as a reference and what method of what class you should call in order to take an automatic snapshot (including the helpful warning to wrap it in a try-catch block since, under certain circumstances, it can raise an exception, such as trying to call it more than 5 times in 30 seconds. The difficulty in discovering and then finding information about the automatic snapshots API was one thing I thought could use improvement. Another thing I think would make it even better would be local copies of the webpages it links to. Although I’m generally always connected to the internet, I imagine there are more than a few developers who aren’t or who are behind very restrictive firewalls. For them (and for me, too, if my internet connection happens to be down), it would be nice to have those documents installed locally or to have the option to download an additional “documentation” package that would add local copies. Another thing that I wish could be easier to manage is the Filters area. Finding and setting individual filters is very easy as is understanding what those filter do. And breaking it up into three sections (basic, by object, and by reference) makes sense. But I could easily see myself running a long profiling session and forgetting that I had set some filter a long while earlier in a different filter section and then spending quite a bit of time trying to figure out why some problem that was clearly visible in the data wasn’t showing up in, e.g. the instance list before remembering to check all the filters for that one setting that was only culling a few things from view. Some sort of indicator icon next to the filter section names that appears you have at least one filter set in that area would be a nice visual clue to remind me that “oh yeah, I told it to only show objects on the Gen 2 heap! That’s why I’m not seeing those instances of the SuperMagic class!” Something that would be nice (but that Red Gate cannot really do anything about) would be if this could be used in Windows Phone 7 development. If Microsoft and Red Gate could work together to make this happen (even if just on the WP7 emulator), that would be amazing. Especially given the memory constraints that apps and games running on mobile devices need to work within, a good memory profiler would be a phenomenally helpful tool. If anyone at Microsoft reads this, it’d be really great if you could make something like that happen. Perhaps even a (subsidized) custom version just for WP7 development. (For XNA games, of course, you can create a Windows version of the game and use ANTS MP on the Windows version in order to get a better picture of your memory situation. For Silverlight on WP7, though, there’s quite a bit of educated guess work and WeakReference creation followed by forced collections in order to find the source of a memory problem.) The only other thing I found myself wanting was a “Back” button. Between my Windows Phone 7, Zune, and other things, I’ve grown very used to having a “back stack” that lets me just navigate back to where I came from. The ANTS MP interface is surprisingly easy to use given how much it lets you do, and once you start using it for any amount of time, you learn all of the different areas such that you know where to go. And it does remember the state of the areas you were previously in, of course. So if you go to, e.g., the Instance Retention Graph from the Class List and then return back to the Class List, it will remember which class you had selected and all that other state information. Still, a “Back” button would be a welcome addition to a future release. Bottom Line ANTS Memory Profiler is not an inexpensive tool. But my time is valuable. I can easily see ANTS MP saving me enough time tracking down memory problems to justify it on a cost basis. More importantly to me, knowing what is happening memory-wise in my programs and having the confidence that my code doesn’t have any hidden time bombs in it that will cause it to OOM if I leave it running for longer than I do when I spin it up real quickly for debugging or just to see how a new feature looks and feels is a good feeling. It’s a feeling that I like having and want to continue to have. I got the current version for free in order to review it. Having done so, I’ve now added it to my must-have tools and will gladly lay out the money for the next version when it comes out. It has a 14 day free trial, so if you aren’t sure if it’s right for you or if you think it seems interesting but aren’t really sure if it’s worth shelling out the money for it, give it a try.

    Read the article

  • .NET 4: &ldquo;Slim&rdquo;-style performance boost!

    - by Vitus
    RTM version of .NET 4 and Visual Studio 2010 is available, and now we can do some test with it. Parallel Extensions is one of the most valuable part of .NET 4.0. It’s a set of good tools for easily consuming multicore hardware power. And it also contains some “upgraded” sync primitives – Slim-version. For example, it include updated variant of widely known ManualResetEvent. For people, who don’t know about it: you can sync concurrency execution of some pieces of code with this sync primitive. Instance of ManualResetEvent can be in 2 states: signaled and non-signaled. Transition between it possible by Set() and Reset() methods call. Some shortly explanation: Thread 1 Thread 2 Time mre.Reset(); mre.WaitOne(); //code execution 0 //wating //code execution 1 //wating //code execution 2 //wating //code execution 3 //wating mre.Set(); 4 //code execution //… 5 Upgraded version of this primitive is ManualResetEventSlim. The idea in decreasing performance cost in case, when only 1 thread use it. Main concept in the “hybrid sync schema”, which can be done as following:   internal sealed class SimpleHybridLock : IDisposable { private Int32 m_waiters = 0; private AutoResetEvent m_waiterLock = new AutoResetEvent(false);   public void Enter() { if (Interlocked.Increment(ref m_waiters) == 1) return; m_waiterLock.WaitOne(); }   public void Leave() { if (Interlocked.Decrement(ref m_waiters) == 0) return; m_waiterLock.Set(); }   public void Dispose() { m_waiterLock.Dispose(); } } It’s a sample from Jeffry Richter’s book “CLR via C#”, 3rd edition. Primitive SimpleHybridLock have two public methods: Enter() and Leave(). You can put your concurrency-critical code between calls of these methods, and it would executed in only one thread at the moment. Code is really simple: first thread, called Enter(), increase counter. Second thread also increase counter, and suspend while m_waiterLock is not signaled. So, if we don’t have concurrent access to our lock, “heavy” methods WaitOne() and Set() will not called. It’s can give some performance bonus. ManualResetEvent use the similar idea. Of course, it have more “smart” technics inside, like a checking of recursive calls, and so on. I want to know a real difference between classic ManualResetEvent realization, and new –Slim. I wrote a simple “benchmark”: class Program { static void Main(string[] args) { ManualResetEventSlim mres = new ManualResetEventSlim(false); ManualResetEventSlim mres2 = new ManualResetEventSlim(false);   ManualResetEvent mre = new ManualResetEvent(false);   long total = 0; int COUNT = 50;   for (int i = 0; i < COUNT; i++) { mres2.Reset(); Stopwatch sw = Stopwatch.StartNew();   ThreadPool.QueueUserWorkItem((obj) => { //Method(mres, true); Method2(mre, true); mres2.Set(); }); //Method(mres, false); Method2(mre, false);   mres2.Wait(); sw.Stop();   Console.WriteLine("Pass {0}: {1} ms", i, sw.ElapsedMilliseconds); total += sw.ElapsedMilliseconds; }   Console.WriteLine(); Console.WriteLine("==============================="); Console.WriteLine("Done in average=" + total / (double)COUNT); Console.ReadLine(); }   private static void Method(ManualResetEventSlim mre, bool value) { for (int i = 0; i < 9000000; i++) { if (value) { mre.Set(); } else { mre.Reset(); } } }   private static void Method2(ManualResetEvent mre, bool value) { for (int i = 0; i < 9000000; i++) { if (value) { mre.Set(); } else { mre.Reset(); } } } } I use 2 concurrent thread (the main thread and one from thread pool) for setting and resetting ManualResetEvents, and try to run test COUNT times, and calculate average execution time. Here is the results (I get it on my dual core notebook with T7250 CPU and Windows 7 x64): ManualResetEvent ManualResetEventSlim Difference is obvious and serious – in 10 times! So, I think preferable way is using ManualResetEventSlim, because not always on calling Set() and Reset() will be called “heavy” methods for working with Windows kernel-mode objects. It’s a small and nice improvement! ;)

    Read the article

  • Reusing WCF Proxy to reduce Memory Usage

    - by Sudheer Kumar
    I am working on a program that uploads BLOB from DB to a Document Management System. I have a WCF service to interact with the DMS. I have a multi-threaded client program that uploads the BLOBs to DMS and every thread used to create and dispose a proxy instance for every record to update. When I have a large no of records to convert, I found that the tool’s memory foot print keeps increasing. After a little debugging I found that the WCF proxies are the culprits for excessive memory usage. I changed the program to re-use the proxies to the service, having one proxy per thread. So in some scenarios, it might be beneficial to re-use WCF proxies.

    Read the article

  • How Can I Safely Destroy Sensitive Data CDs/DVDs?

    - by Jason Fitzpatrick
    You have a pile of DVDs with sensitive information on them and you need to safely and effectively dispose of them so no data recovery is possible. What’s the most safe and efficient way to get the job done? Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites. The Question SuperUser reader HaLaBi wants to know how he can safely destroy CDs and DVDs with personal data on them: I have old CDs/DVDs which have some backups, these backups have some work and personal files. I always had problems when I needed to physically destroy them to make sure no one will reuse them. Breaking them is dangerous, pieces could fly fast and may cause harm. Scratching them badly is what I always do but it takes long time and I managed to read some of the data in the scratched CDs/DVDs. What’s the way to physically destroy a CD/DVD safely? How should he approach the problem? The Answer SuperUser contributor Journeyman Geek offers a practical solution coupled with a slightly mad-scientist solution: The proper way is to get yourself a shredder that also handles cds – look online for cd shredders. This is the right option if you end up doing this routinely. I don’t do this very often – For small scale destruction I favour a pair of tin snips – they have enough force to cut through a cd, yet are blunt enough to cause small cracks along the sheer line. Kitchen shears with one serrated side work well too. You want to damage the data layer along with shearing along the plastic, and these work magnificently. Do it in a bag, cause this generates sparkly bits. There’s also the fun, and probably dangerous way – find yourself an old microwave, and microwave them. I would suggest doing this in a well ventilated area of course, and not using your mother’s good microwave. There’s a lot of videos of this on YouTube – such as this (who’s done this in a kitchen… and using his mom’s microwave). This results in a very much destroyed cd in every respect. If I was an evil hacker mastermind, this is what I’d do. The other options are better for the rest of us. Another contributor, Keltari, notes that the only safe (and DoD approved) way to dispose of data is total destruction: The answer by Journeyman Geek is good enough for almost everything. But oddly, that common phrase “Good enough for government work” does not apply – depending on which part of the government. It is technically possible to recover data from shredded/broken/etc CDs and DVDs. If you have a microscope handy, put the disc in it and you can see the pits. The disc can be reassembled and the data can be reconstructed — minus the data that was physically destroyed. So why not just pulverize the disc into dust? Or burn it to a crisp? While technically, that would completely eliminate the data, it leaves no record of the disc having existed. And in some places, like DoD and other secure facilities, the data needs to be destroyed, but the disc needs to exist. If there is a security audit, the disc can be pulled to show it has been destroyed. So how can a disc exist, yet be destroyed? Well, the most common method is grinding the disc down to destroy the data, yet keep the label surface of the disc intact. Basically, it’s no different than using sandpaper on the writable side, till the data is gone. Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.     

    Read the article

  • AMD sort l'APU Z-60, un processeur spécialement conçu pour Windows 8

    AMD sort l'APU Z-60 un processeur spécialement conçu pour Windows 8, la société dévoile son fer de lance pour la conquête du marché des tablettes Tout comme Intel, AMD espère surfer sur la vague Windows 8 pour se faire une place dans le marché des tablettes largement dominé par les architectures ARM. Le constructeur vient de présenter sa gamme de processeurs Hondo accelerated processor unit (APU), spécialement conçue pour les tablettes Windows 8. L'APU Z-60 utilise la même architecture que le Z-01, premier processeur d'AMD pour les tablettes. Comme les puces Clover Trail d'Intel, le Z-60 est une solution dual-core qui dispose d'un processeur Hondo regroupant deux coeurs...

    Read the article

  • Firefox 16 disponible : ajout du Developer Toolbar et d'un ramasse-miettes incrémental pour JavaScript

    Firefox s'offre une ligne de commande le Developer Toolbar permet d'interagir avec une page, la bêta de la version 16 sort Ce sont les vacances pour certains, mais pas pour la fondation Mozilla qui reste fidèle à son cycle de développement rapide de Firefox. À peine la version 15 du navigateur disponible, son successeur pointe déjà le bout de son nez. Mozilla vient de faire passer Firefox 16 du Canal Aurora au Canal bêta, et vante déjà la nouveauté phare qui sera disponible au sein du navigateur. Firefox 16 dispose d'une nouvelle ligne de commande, permettant aux développeurs d'interagir de façon ...

    Read the article

  • Immutable design with an ORM: How are sessions managed?

    - by Programmin Tool
    If I were to make a site with a mutable language like C# and use NHibernate, I would normally approach sessions with the idea of making them as create only when needed and dispose at request end. This has helped with keeping a session for multiple transactions by a user but keep it from staying open too long where the state might be corrupted. In an immutable system, like F#, I would think I shouldn't do this because it supposes that a single session could be updated constantly by any number of inserts/updates/deletes/ect... I'm not against the "using" solution since I would think that connecting pooling will help cut down on the cost of connecting every time, but I don't know if all database systems do connection pooling. It just seems like there should be a better way that doesn't compromise the immutability goal. Should I just do a simple "using" block per transaction or is there a better pattern for this?

    Read the article

  • Design difficulty for multiple panel forms [closed]

    - by petre
    I have form that consists of multiple panel on the right, a treeview on the left and a terminal richtextbox on the bottom. When i click on a node of the treeview i bring up the panel that is attached with the node. For example i have 10 nodes on the treeview, i have 10 panels that are attached to this nodes. On every panel, i have many textboxes, labels, comboboxes etc. I don't dynamically construct and dispose the items on the panels, i create the items in the designer file of the project. In that case, there is a problem. I really find it difficult to align or place items on the panel because there seems a lot of aligning lines on the screen. What should be done to make the design of the panels easy? I don't want to construct items dynamically. Do i have to do that dynamically or is there a design procedure that make this process easy?

    Read the article

  • Internet Explorer 10 bientôt disponible pour Windows 7, Microsoft annonce la sortie d'une préversion en novembre

    Internet Explorer 10 bientôt disponible pour Windows 7, Microsoft annonce la sortie d'une préversion en novembre Les utilisateurs de Windows 7 pourront télécharger une préversion d'Internet Explorer 10 à partir de mi-novembre. IE 10 est la prochaine mise à jour majeure du navigateur de Microsoft qui sera disponible en version finale au même moment que Windows 8 annoncé pour le 26 octobre prochain. Cette version se distingue essentiellement par sa nouvelle interface qui repose sur les tuiles Windows 8 et le support de la navigation tactile. Le navigateur dispose de nouvelles capacités de développement et de performances améliorées grâce à l'accélération matérielle. M...

    Read the article

  • WordPress sort en version 3.5 : meilleure gestion de contenus multimédias, du mobile et des écrans Retina

    WordPress sort en version 3.5 meilleure gestion de contenus multimédias, du mobile et des écrans Retina WordPress, le plus populaire des scripts de blogs PHP, est disponible en version 3.5, et arbore fièrement le nom de code "Elvin" en l'honneur ou batteur Elvin Jones. La dernière version majeure du système de gestion de contenu pour cette année apporte un nombre important de nouveautés et des corrections de bogues pour le plus grand plaisir des développeurs et blogueurs. Wordpress 3.5 introduit une nouvelle expérience simplifiée pour la gestion de contenus multimédias. Le système dispose d'un nouvea...

    Read the article

  • Firefox s'offre une ligne de commande, le Developer Toolbar permet d'interagir avec une page, la bêta de la version 16 sort

    Firefox s'offre une ligne de commande le Developer Toolbar permet d'interagir avec une page, la bêta de la version 16 sort Ce sont les vacances pour certains, mais pas pour la fondation Mozilla qui reste fidèle à son cycle de développement rapide de Firefox. À peine la version 15 du navigateur est disponible, son successeur pointe déjà le bout de son nez. Mozilla vient de faire passer Firefox 16 du Canal Aurora au Canal bêta, et vante déjà la nouveauté phare qui sera disponible au sein du navigateur. Firefox 16 dispose d'une nouvelle ligne de commande, permettant aux développeurs d'interagir de fa...

    Read the article

  • Qaulcomm présente la nouvelle gamme de processeurs Snapdragon S4, pouvant équiper les futures tablettes Windows 8

    Qaulcomm présente la nouvelle gamme de processeurs Snapdragon S4 Pouvant équiper les futures tablettes Windows 8 Qualcomm, le constructeur de puces pour smartphones et tablettes, vient d'annoncer la sortie de nouveaux modèles de processeurs de la famille Snapdragon. La gamme S4, la nouvelle génération des puces de haute performance avec optimisation 3G/4G pour les smartphones et tablettes haut de gamme dispose désormais de 8 nouveaux modèles : MSM8660A, MSM8260A, MSM8630, MSM8230, MSM8627, MSM8227, APQ8060A et APQ8030. Les nouvelles références S4 sont disponibles en simple coeur, double coeur et quadricoeur. Les puces quadricoeur seront basées sur une architecture A...

    Read the article

  • Team Foundation Service passe au Cloud, la plateforme de gestion du cycle de vie de Microsoft ne vise plus uniquement .NET ou Windows

    Microsoft lance Team Foundation Service la version Cloud de son outil de gestion du cycle de vie des applications Près d'une année après avoir dévoilé la beta de Team Foundation Service (TFS), Microsoft annonce le passage de la version hébergée de Team Foundation Server sur Windows Azure en version finale. Pour rappel, Team Foundation Server est une solution de travail collaboratif et de gestion du cycle de vie des applications (ALM) permettant : la gestion des sources, des builds, le suivi des éléments de travail, la planification et l'analyse des performances. La version hébergée de l'outil dispose des outils de gestion de projets agiles supportant SCRUM et Capability Ma...

    Read the article

  • LibreOffice : la Release Candidate 2 disponible, quelles différences avez-vous trouvées entre LibreOffice et OpenOffice.org ?

    LibreOffice : la Release Candidate 2 disponible Quelles différences avez-vous trouvées entre LibreOffice et OpenOffice.org ? La deuxième Release Candidate de LibreOffice 3.3, la suite bureautique issue du fork d'OpenOffice.org est disponible. Cette version apporte quelques améliorations et corrections de bugs grâce aux contributions de 80 développeurs depuis la bêta 3. A l'occasion de cette sortie, LibreOffice dispose désormais de son propre site Web disponible aussi en Allemand et partiellement en une dizaine de langues. La version française est elle encore très incomplète. Pour l'heure, LibreOffice ne se démarque pas encore significativement du cana...

    Read the article

  • Google apporte une refonte à l'interface de son réseau social Google+, les développeurs mécontents

    Google apporte une refonte à l'interface de Google+ les développeurs mécontents Google est aux trousses de Facebook, et ne souhaite pas se laisser distancer par le réseau social. Après la mise à jour de Facebook avec l'introduction de Timeline, c'est au tour du réseau social Google+ de subir un lifting complet de son interface. Le géant de la recherche a annoncé dans un billet de blog une refonte du design du site qui se rapproche un peu plus de Facebook. L'interface conçue autour de la simplification et de la personnalisation, dispose désormais d'un ruban à gauche de l'écran donnant accès aux fonctionnalités les plus usuelles comme les photos et les profil...

    Read the article

  • Internet Explorer 10 Preview disponible pour Windows 7, le navigateur bat Chrome et Firefox sur le test Mandelbrot

    Internet Explorer 10 bientôt disponible pour Windows 7, Microsoft annonce la sortie d'une préversion en novembre Les utilisateurs de Windows 7 pourront télécharger une préversion d'Internet Explorer 10 à partir de mi-novembre. IE 10 est la prochaine mise à jour majeure du navigateur de Microsoft qui sera disponible en version finale au même moment que Windows 8 annoncé pour le 26 octobre prochain. Cette version se distingue essentiellement par sa nouvelle interface qui repose sur les tuiles Windows 8 et le support de la navigation tactile. Le navigateur dispose de nouvelles capacités de développement et de performances améliorées grâce à l'accélération matérielle. M...

    Read the article

  • Oracle Linux sort en version 6.3 : améliorations du système de fichiers Btrfs, des performances et optimisations du Kernel

    Oracle Linux sort en version 6.3 améliorations du système de fichiers Btrfs, des performances et optimisations du Kernel Oracle a publié récemment la version 6.3 de son système d'exploitation Oracle Linux. Créée à partir du clonage des sources de la distribution Red Hat Enterprise Linux (RHEL), cette mouture contient toutes les améliorations et nouveautés de RHEL 6.3. La plus grande différence entre Oracle Linux 6.3 et RHEL 6.3 est l'utilisation du noyau optimisé 2.6.39, qui dispose de plusieurs améliorations et corrections par rapport à l'original, et l'installation par défaut de « Unbreakable Enterprise Kernel 3.0.16 ». Oracle Linux 6.3 propose également la mise à jour de plusi...

    Read the article

  • Microsoft surface 2.0 disponible en précommande : la table tactile plus sophistiquée et moins cher

    Microsoft surface 2.0 disponible en précommande la table tactile plus sophistiquée et moins cher Microsoft en collaboration avec Samsung lance la seconde version de la table tactile Surface, après un peu plus de quatre depuis la disponible de Surface 1. La nouvelle table baptisée « Samsung SUR40 », dont les précommandes sont déjà ouvertes, dispose d'une meilleure qualité d'affichage que la version précédente, avec un écran LCD tactile de 40 pouces qui offre une définition Full HD 1080p, pouvant gérer jusqu'à 50 points de contact. Le dispositif permet d'obtenir une luminosité maximale de 300 cd par mètre carré, un taux de contraste de 2000 :1, un temps de réponse de 8 ms ...

    Read the article

  • Microsoft finalise Windows Server 2012 Essentials, l'OS serveur pour petites entreprises disponible gratuitement en version d'évaluation

    Windows Server 2012 Essentials sort en Release Candidate la version finale sera publiée avant la fin de l'année Microsoft vient d'annoncer la sortie de la Release Candidate de Windows Server 2012 Essentials. La version Essentials des systèmes d'exploitation serveur de Microsoft est destinée aux petites et moyennes entreprises, avec une limite de 25 utilisateurs et 50 appareils. Elle offre un accès facile au Cloud, mais ne dispose pas de fonctionnalités de virtualisation. Windows Server 2012 Essentials rationalise la gamme des produits serveur de Microsoft en direction des PME, qui s'est désolidarisé des éditions Windows Small Business Server (SBS) 2011 et Windows Home Server....

    Read the article

  • Une puce utilise la zone interne de l'oreille comme source d'énergie, une invention des Labs du MIT

    Bientôt des appareils alimentés par l'oreille humaine ? Des chercheurs du MIT créent une puce qui utilise une zone interne de l'oreille comme source d'énergie Des Google Glass qui tirent leur énergie du corps de leur hôte. Cela pourrait être une réalité si Google dote ses lunettes de réalité augmentée de la nouvelle invention du MIT (Massachusetts Institute of Technology). Des scientifiques du MIT ont découvert qu'une petite zone de l'oreille dispose de capacités électriques faisant partie du processus biologique qui permet d'entendre. Cette petite zone convertit la force mécanique du son en un signal électrochimique pouvant être interprété par le cerveau. ...

    Read the article

  • IE10 apporte un meilleur support du HTML5 sur Windows Phone 8, Microsoft détaille les différences avec la version Windows 8

    IE 10 apporte un meilleur support du HTML 5 sur Windows Phone 8 Microsoft détaille les différences avec la version Windows 8 L'une des principales causes des mauvaises performances du HTML5 sur le mobile serait le niveau de support de ses fonctionnalités par les navigateurs mobiles qui serait très variable par rapport au Desktop. Avec la sortie de Windows Phone 8 qui dispose d'une déclinaison mobile du navigateur Internet Explorer 10, Microsoft a principalement mis l'accent sur le support du HTML5. La société dans un billet de blog, fait le point sur les améliorations du navigateur concernant le standard du Web, ainsi que ses différences avec la version pour Windows 8.

    Read the article

  • Disposing of ContentManager increases memory usage

    - by Havsmonstret
    I'm trying to wrap my head around how memory management works in XNA 4.0 I've created a screen management test and when I close a screen, the ContentManager created by that screen is unloaded. I have used ANTS Memory Manager to look at how the memory usage is altered when I do this, and it gives me some results which makes me scratch my head. The game starts with loading two textures (435kB and 48,3kB) which puts the usage at about 61MB. Then, when I delete the screen and runs Unload on the ContentManager, the memory usage drops to 56,5MB but instantly after goes up to 64,8MB. Am I doing something wrong or is this usual for XNA games? Do I have to dispose of everything the ContentManager loads seperatly or do I need to do something more to the ContentManager? Thanks in advance!

    Read the article

  • La mise à jour Java 7u10 sort, Oracle ajoute des options pour bloquer ou appliquer des restrictions aux applications Web

    La mise à jour Java 7u10 sort Oracle ajoute des options pour bloquer ou appliquer des restrictions aux applications Web Java a été ces derniers mois pointé du doigt à plusieurs reprises par des experts en sécurité pour ses failles. Ces vulnérabilités de la plateforme de développement pouvaient être exploitées via des programmes s'exécutant dans les navigateurs. La mise à jour Java 7 Update 10 (Java 7u10), bien que n'apportant pas des correctifs de sécurité, dispose des fonctionnalités assez intéressantes qui permettront de réduire les risques d'attaques via des navigateurs, en ayant un meilleur contrôle sur le contenu Web. L'outil permet désormais de désactiver n'imp...

    Read the article

  • JRuby 1.6 passe en RC, support de Ruby 1.9.2 et compatibilité Windows pour l'implémentation alternative de Ruby sur la JVM

    JRuby 1.6 passe en RC Support de Ruby 1.9.2 et compatibilité Windows pour l'implémentation alternative de Ruby sur la JVM JRuby 1.6, la nouvelle version majeure de l'implémentation alternative du langage Ruby sur la Machine Virtuelle Java, sera bientôt prête. Elle vient en effet d'atteindre le stade de Release Candidate. Il s'agit de la première version en date de JRuby qui soit compatible avec Ruby 1.9.2 - première version de la branche 1.9.x du langage qui soit réellement stable et prête pour la production selon ses concepteurs. Mais JRuby 1.6 dispose aussi d'un mode Ruby 1.8.7. L'équipe du projet s'est penchée sur l'amélioration de la compatibilité avec les envir...

    Read the article

  • Dojo 1.8 : introduction de nouveaux composants dont le calendrier, la jauge et le treemap pour le framework JavaScript

    Dojo 1.8 : introduction de nouveaux composants dont le calendrier, la jauge et le treemap pour mobile et pour navigateur La version 1.8 de Dojo amène avec elle de nouveaux composants que vous pouvez déjà découvrir dans la version beta sortie dernièrement. Le calendrier Le composant calendrier dispose d'une belle interface utilisateur et permet une vision par jour, par semaine, par mois ou bien par année. Bien entendu, ce composant est compatible avec les APIs Dojo et peut être manié sans problème. Il en est de même au niveau des CSS. Des adaptations sont réalisables facilement. [IMG]http://dojotoolkit.org/blog/wp-content/uploads/2012/05/calendar-e13364...

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >