Sage 50 2016.2 Slow Painting The Screen on Remote Desktop

Hi, 

We have a couple of servers running Windows 2012 R2 Remote Desktop Services (aka Terminal Services). Sage50 installation is 2016.2. 

Issue: when opening any of the Invoices, Sales, etc.. dialog windows (you know, those that typically have a light green or blue background color), you literally see how the window is painted and it takes 3-5 seconds to display all the buttons and fields. This happens all the time regardless of how fast these servers are (SSD disks, 16 GB RAM, etc.) or whether there's load on the server. I've seen it myself when I'm the only user on the server at 2 AM in the morning. 

The servers were installed recently and they have always the latest OS patches, etc. 

Please, advise. 

Thanks

  • 0

    AOSAdmin said:
    Issue: when opening any of the Invoices, Sales, etc.. dialog windows (you know, those that typically have a light green or blue background color), you literally see how the window is painted and it takes 3-5 seconds to display all the buttons and fields.

    In tests that I have done, when this is *very* slow, it can be due to:

     -  the delay between the client program requesting data, and the database delivering it (Invoice data is in dozens of tables, as are user preferences, etc).  It looks a lot like slow painting, but it can be slow data retrieval.

    The database server cache should be larger than the 'company file' ('Memory buffer size (in MB) in the Connection Manager should be larger than the size showing in Help | About.  Data reads from RAM are faster than the best SSD.

    There should be at least a 1 Gbit connection between the client (or terminal server) and the data server, if there's a cable between them.

     - The location of temp files  (i.e. are they on a local disk to the Sage 50 client software?  redirected folder?  Roaming profile?)

    Lists are stored in Temp files, and they are accessed frequently on the Invoice screens.

     - Anti-Malware software that carefully scans database data that couldn't possibly contain a virus.

     - automatic defragmentation should be off for the database volume.  There's not much benefit to scanning a database.

     - Any software that synchronizes, backs up, monitors, or otherwise performs a lot of actions on the disk is suspect.  VSS should be disabled, since MySQL is not VSS-aware.

    Is it really a lot slower on the terminal server, than from a workstation?  

  • 0 in reply to RandyW

    Let's see:

    1) All systems are running on the same server: users remote in to a server where Remote Desktop Services is installed, Sage and its database are there as well. I don't have multiple volumes on this server, everything is on the C drive. But again, on the other server with a similar setup and SSD disks, I do have different volumes and I have the same slowness

    2) I don't have any antivirus system running on the server for now

    After your suggestion, I'm increasing the memory buffer in the Conn Manag to 2048MB ... not sure if I have to restart the service though. 


    The slowness we experience goes from 3-5 seconds every time a user opens one of those dialog windows (Invoices, Receipts, etc..). Even after you have the window loaded, if you click on the Maximize button, it takes time to "repaint" the window... and at the point, I would assume that the data had been already loaded. So there's something going on here. I mean, it's not suuuuper slow but we have other applications running on this server (Outlook, Excel, etc.) and none of them have this lag. 

    Thanks

  • 0 in reply to AOSAdmin

    AOSAdmin said:
    After your suggestion, I'm increasing the memory buffer in the Conn Manag to 2048MB ... not sure if I have to restart the service though. 

    Yes.  the MySQL daemon needs to shut down completely.

    AOSAdmin said:
    The slowness we experience goes from 3-5 seconds every time a user opens one of those dialog windows (Invoices, Receipts, etc..). Even after you have the window loaded, if you click on the Maximize button, it takes time to "repaint" the window... and at the point, I would assume that the data had been already loaded

    I get that same effect on this workstation, but I would say it's about twice that fast (M82 ThinkCentre with I5 proc.  Sage 50 stores monitor sizes and window positions for each (Sage 50) user, so it might be writing the 'restored' size to the database each time it's 'Maximized'.   Restoring the window seems instant, so that may get pulled from 'cache'.

    I would assume that the data had been loaded too, but that might not be the case.  It's easy to measure data access on with a workstation by just graphing network activity.  On Terminal Server and / or in a VM it might be more of a challenge.

    To work around the issue of screen load time, (when we were still using Pentium-IV workstations) we learned to use control-z to clear an invoice form and start a new invoice, rather than closing the one just looked up, and opening a new one each time.   We had a consultant look at it, but he went down a rabbit hole on video resolution, colour depth, and directX.  (Sage 50 doesn't use DirectX, and low resolution with less colour depth was slower as well as unreadable, so that didn't work at all)

    AOSAdmin said:
    So there's something going on here. I mean, it's not suuuuper slow but we have other applications running on this server (Outlook, Excel, etc.) and none of them have this lag.

    Sage 50 is kind of special, sometimes.  It's a complicated application, and perhaps has some legacy code or frameworks that use older, slower API calls than a newly minted Microsoft application would have.

    AOSAdmin said:
    But again, on the other server with a similar setup and SSD disks, I do have different volumes and I have the same slowness

    I like to take a 'divide and conquer' approach to narrow down problems like this - like an optometrist's "Which is clearer - A (click) or B?"   Slice off the chunks you don't need to look at.

    Even if you only have access to Terminal Server to test with, and can't easily isolate a "client" vs "server" vs "terminal server" issue:

     - You could test 'disk access' by attaching a fast (USB 3.0) external drive.   (but I really doubt that the SSD is a bottleneck.)

     - You could test the company data and the user settings by opening the sample file that comes with Sage 50 (if it was installed).  If the screens in the sample file load noticeably faster, you would have eliminated the client software (i.e. loading a resource from a DLL) and the installation, as well as Terminal Server, as trouble points. 

    If there is a large difference between the client's company file and the sample file, I would look at user settings, list sizes, temp files, etc.

    Testing the company data on another system could give more feel as to how long certain things will take.   A minimum 'test harness' could be backing up to a network or USB, and installing / restoring on a laptop. 

    I hope that helps, please post back!

    For the benefit of anyone reading this, I'm not a Sage employee, and all responsibility for following any suggestion belongs entirely to the reader.  (as does the credit for anything that works!)

  • 0 in reply to RandyW

    Hi Randy,

    I tried all these stuff without luck. Even tried with Sage 2015.3 and the latest 2016.2, on 4 computers running Windows 2008 R2, Windows 7, Windows 8.1 and Windows 10, same thing. I've contacted Sage support and they are telling me, essentially, that they don't know what is going on.

    Here's a video showing what's going on:

    aoshield-my.sharepoint.com/.../guestaccess.aspx

    The same goes if I tried opening an invoice, a receipt, etc. The issue is worse if the dialog window is opened in Maximize mode.

    Let me know if there's anything else I could try. Sage support has been useless so far...

    S.

  • 0 in reply to AOSAdmin

    AOSAdmin said:
    Even tried with Sage 2015.3 and the latest 2016.2, on 4 computers running Windows 2008 R2, Windows 7, Windows 8.1 and Windows 10, same thing.

    Even though you're testing from a Terminal Server to several different end clients, you're still testing the exact same thing.  Using roughly the same data, using two nearly identical software packages with the same test rig won't show where the problem is.

    If the Terminal Server system is that slow, opening the sample file, the problem is in the system setup, and not the data or where it's stored.

    If opening that company data from a decent laptop is slow, but opening the sample file is not slow, then there is a problem with the data. 

    In my experience, the end user complaint of "It doesn't work and I tried all that Stuff" and the I.T / I.S. response of "It works fine on my machine" are equally unhelpful in getting to the root of the problem. 

    If it helps to know, our system is faster than what I see in that video, using RDP over an internet connection that goes through two separate ISPs. 

  • 0 in reply to RandyW
    Let me be clear here: I didn't test Sage from all those different OSes against the same Terminal Server. I tried that on different computers. Otherwise, it would've been silly -- I'm a network engineer and not a Sage user by any means.

    The thing is that even a fresh installation of Sage does the same to me. Again, tested on different computers. And I'm not sure where else to look at.

    Thanks !
  • 0 in reply to AOSAdmin

    One last time:

    Have you tried opening the sample data, or not?  If installed, the filename of the sample company is 'universl.sai'.

    What is the size of the file 'ibdata1' in the company data folder, or what is the data size showing in File | Properties?

    Does it behave any differently when local vs terminal window.  

    In the video, I would say that was taking 10 seconds or so to display.

    Just did some testing from home, connecting via RDP to a Windows workstation that accesses data from a LAN server:

    Opened the sample data - the window opens and displays in about 1 second.  This is a small file, loading from local disk.  Clicked the left and right arrows, no noticeable delay.

    Opened a few invoices in a 'real' file by drill-down from the aged Payables report - again, about 1, definitely under two seconds.   This is an important test, since this file is more than 30 times larger than the sample data, and loads over a LAN from a server.

    Tried going full screen (1920x1200) and noticed it was substantially slower.

    Then tried clicking the arrows to scroll through the invoices for a customer - no noticeable delay in displaying the data, perhaps 1 second.  The resources for the form are not loaded from the DLL each time.

  • 0 in reply to RandyW
    I've conducted most of my tests using the Sample Company Data.

    The video was taking when working on a customer's Sage file though. But we get essentially the same effect: huge delays when Sage "paints" the screen.

    Testing the Sample data on both the server (through remote desktop) and on a local computer gets us the same results. I mean, the server is maybe 1 sec (at most) slower, but it's comparable with the local performance.
  • 0

    AOSAdmin, did you ever find a solution to this issue? I've scoured the internet for a solution and your post here was the best to articulate the issue. There are plenty of companies that have this issue but due to an inability to accurately communicate the issue on Sage forums in how Sage 50 'paints' the program on the screen, the response from others hasn't targeted the real issue. It's literally a 10 second wait as various windows, like quotes, stalls before it finishes putting itself on the screen. We see the outline of the window with white boxes but no text.
     
    We had the issue with Sage 50 2016 and it seems the problem has carried into 2017.1.

    Same as you we have a Windows 2012 R2 Remote Desktop Services (RDS aka Terminal Services) server hosting the data for our remote users on a high end server.

    We even went so far as to stick a 10gbps (that's ten gig, not your standard gigabit) NIC in the server to communicate to a 10gbps workstation NIC and the issue is still grossly apparent via RDS. It seems the speed of the network has no effect on the quality of the experience.

    We found that adjusting the report colors to 8-bit base colors slightly improves the experience but even that doesn't fix the heart of the issue - it seems Sage stalls in bringing up the invoice or quote windows, before it finishes drawing the screen.

    Tried the following to no avail:
    - Compatibility Mode for Windows 7 and also XP
    - Reduced color mode to 8-bit
    - Disable display scaling
    - Upgraded to 10gbps network uplink

    I have a feeling this is an inherent issue with Sage 50 on Windows RDS servers but if anyone googles this and later finds a solution, I'd love to hear it.

  • 0 in reply to niagarasys
    niagarasys:

    I don't normally run Sage 50 via RDP, but just as a test I connected to one of my other PC using Windows 10 RDP over a 1GB hardwired LAN.
    I then launched Sage 50, there was only a slight additional delay in displaying the Sage 50 Main window. I then tried to open a Sales Quote window, from the time I clicked on the icon in the program to the time it displayed full screen was about 12 seconds in total, if I open the same Sales Quite window on my local PC it only takes about 2 seconds to fully display.
    I also did a very quick test of changing some of the setting in the RDP connection and none of them had any noticeable effect on the time it takes to fully display the Sales Quote window.

    Hopefully this will help confirm that it is something to do with the way the windows are displayed in Sage 50 and not due to data caches and network connection speeds.
  • 0 in reply to Ginkgo Bike
    Bruce, I really appreciate you going through the trouble to check this and it removes an item off my list of 'things to check next'. Since I posted I've tried more on the server side of things but hadn't considered checking to see if desktop hosting RDP sessions have the same issue. Knowing that it does I suppose there isn't much that can be done outside of providing feedback to Sage concerning this issue.
  • 0 in reply to niagarasys
    niagarasys:

    My observation is that the screen is being built up in a series of small sections, on the local machine the video card handles the redraws very efficiently, it would appear that the RDP video subsystem is trying to redraw all these changes on the remote screen and just gets overwhelmed. This is all based on my observations and speculations, combined with 20 years of computer support knowledge; most of it in a corporate environment with over 1,000 desktops and several Citrix servers.
  • 0 in reply to niagarasys

    niagarasys said:
    It's literally a 10 second wait as various windows, like quotes, stalls before it finishes putting itself on the screen.

    Sage 50 seems to throw the screen up with the defaults, then redraw it in pieces as the bits and pieces are collected from the company database.

    Could you please check whether there is / isn't a noticeable difference between the company's and the sample 'Universal Construction' data? 

  • 0 in reply to RandyW
    This is interesting as it leads to a further insight. It's not the data that you're working with but rather it's changing the window size with certain aspects of Sage 50 that creates the issue.

    * just maximizing a quote will produce the issue *

    Get this though, if you stretch the window to the extents of the screen (not maximize), you can move it around freely and it won't redraw!

    To fast forward past a lot of efforts on my side, I found that if I take a fresh server with a fresh install of Sage 50 and then import the company data and just click reports the first time it comes up with a minor 2 second delay.

    If I resize the window to make it full screen... game over man.

    So basically I've found the issue - regardless of whether or not you use the sample data or the long term company data, the size of the window correlates to how long it takes for Sage to draw the window. If you have it at, say, reduced size of 1/4 of the screen it will come up fairly quick. If you make it full screen it will take a literal 10 seconds to draw on screen.

    So if I open session at 1280 x 1024 and run the program at 640 x 480, it's a few seconds.

    If I open a session at 1280 x 1024 and run the program at full screen 1280 x 1024, it's 10 seconds.

    If I open a session at 2560 x 1600 and run the program at full screen 2560 x 1600, it's something like 10 - 15 seconds.

    If I open a session at 2560 x 1600 and run the program at tiny 640 x 480, it's a few seconds.

    So there's a direct correlation to Sage 50 window sizes and a serious delay in screen drawing for certain functions when the function, like quote or invoice, is loaded.

    Other windows, like reports, don't have the issue.
  • 0 in reply to niagarasys

    niagarasys said:
    If you have it at, say, reduced size of 1/4 of the screen it will come up fairly quick.

    Makes sense, the more pixels the program has to paint / draw, the longer it takes to send each pixel.  Maybe the reason I've never seen this problem, is that I use windows 'restored' rather than 'maximized'.  

    Because...  Windows... plural.  Otherwise it would have been called 'Slow DOS with Pretty Colours'.

    Randy Wester

  • 0 in reply to RandyW
    Well I wouldn't necessarily say it makes sense because it's still a glitch that needs a resolution. Telling users they need to run at 640 x 480 isn't going to fly.

    Considering that Windows Server 2016 provides two licenses for two instances per system and many companies are going with a native for data + hyper-v for Sage 50 user sessions I expect this software bug will become even more noticeable as more companies go this route (and QuickBooks, Spire, etc. obviously doesn't have this issue).
  • 0 in reply to niagarasys

    niagarasys said:
    Telling users they need to run at 640 x 480 isn't going to fly.

    I just did a quick copy/paste of my invoice screen into PAINT, it's at 1415 x 631 pixels, so about a third of the total dual monitor width x about half the height.  Works great remotely with one physical monitor at 1920x1280.  Unfortunately I didn't set it up so I can't tell you how it compares to another system.

    niagarasys said:
    many companies are going with a native for data + hyper-v for Sage 50 user sessions

    Sage 50 was designed and built (and hopefully optimized) as a client/server program, but a quick Google search turned up resellers hosting it as SAAS.  They must have gotten it to work reasonably well without resorting to the Dark Arts and RAM drives.

    I hear good things about 'seamless' RDS.  Does it work / act any differently?  

    (I heard those good things from the same salesman that told us we couldn't have more than 5000 items in a SharePoint Online list because it was like a bus teetering on the edge of a cliff, and that Sage 50 didn't work with downloaded Office 365, we had to buy a dozen 'open license'  copies at $900 each and install from CD.  So really not sure if there's any difference in user experience)

     

  • 0 in reply to RandyW
    Sure, you can work with a copy of the screen just fine; The issue isn't what's appearing on screen but rather how Sage50Accounting.exe is rendering the Revenue Journal on screen, probably via gdiplus.dll.
  • 0 in reply to niagarasys

    niagarasys said:
    Sure, you can work with a copy of the screen just fine;

    What I meant, was that I used copy / paste in paint to measure the number of pixels, not that painting a bitmap is the same as refreshing a combobox, or that I could remotely copy / paste it quickly.

    niagarasys said:
    probably via gdiplus.dll.

    There's a list of the DLLs used under Help | About | Support Info.  I would download the sysinternals suite and use DEPENDS, PROCEXP, and PROCMON to find out.

    niagarasys said:
    The issue isn't what's appearing on screen but rather how Sage50Accounting.exe is rendering the Revenue Journal on screen

    Yes, I get that.  It's a mildly irritating 2-3 second wait on an I5 running client-server on a 1 GB network.  But there's no delay at all when running the sample data from the local hard drive. 

     If you can't make it better, sometimes knowing what makes it worse can help, so I continue with what you were doing - changing colour depth, throttling system resources, etc.    (and also slowing the network connection, restricting RAM, running from a copy of the data on a cheap memory stick, trying it with the antimalware temporarily disabled, that sort of thing.)  

    Once I had enough data to narrow it right down, I would open a support case with Sage.  Just because they don't officially support that configuration doesn't mean they have no idea.  The SAAS providers probably aren't using a secret '-NoFunkyScreenRefresh' switch.

  • 0 in reply to RandyW
    Wait, what do you mean there's no delay when running the sample data? We might not be on the same page as there's just as significant a delay with *any* data, the issue has nothing to do with the data but redrawing the screen when loading the revenues journal when your default is maximized.
  • 0 in reply to niagarasys
    With our old workstations and server, my response to "it takes a lot of time to load this screen" was "why did you close it just then?". It turned out the clerk didn't know she could clear a screen with control-z and pick another order from the dropdown list, or restore down and switch back and forth to the open Sales Order report and still have room on screen for the PDFs of the invoices. Most importantly, she didn't know that it would help to keep the screen open.

    I meant there was no delay in the system starting to display the invoice screen, certainly not 10 seconds. And
    - the difference between invoice screens using remote access vs. at the workstation was negligible, and
    - there was an additional delay in loading an invoice screen with a lot of data, and
    - seemed to be a delay if there were a lot of large lists in the company data vs. the sample file.

    Screen type Screen size System Company file Time to load

    Order(blank) Maximized Local I5 Sample 2.5 sec
    Order(blank) Restored Local I5 Sample 2 sec

    Order(blank) Maximized RDS I5 Sample 4 sec
    Order(blank) Restored RDS I5 Sample 3.5 sec


    There is an additional load time, the first time the screen is loaded after program startup (about 2 seconds). Presumably this is the system time to load the resources from a DLL + the time to look up the company file and user settings for the columns and screen size, plus the load time for any drop-down lists that are part of that screen. (caveat, I haven't done any deep analysis, that's based on what I know about how software works, generally + how Sage 50 stores the screen positions in the company file)

    For a large company file, there is an additional 3-5 second wait to call up the data for a large, multipage order.

    I'm at home today, so I checked a remote connection vs. this I5 laptop.

    My testing was just an RDP to a workstation, not a dedicated server. It's over an internet connection from fiber at my home to another ISP's wireless connection 10Km away. So plenty of latency, a cheap single hard drive at the host plus another network hop to the server, lots of paranoid antimalware all 'round. And the difference between remote and local is so small it's hard to measure.

    I don't personally work for Sage, and neither sell nor particularly endorse their products.
  • 0 in reply to niagarasys
    Was there any further development on this issue? This is the ONLY thread I can find that leads to a 'solution'. Having my users use small windows alleviates some of the issue, but this seems like a core Sage programming issue when it comes to video display...

    Were there any fixes that anyone is aware of to mitigate this fully?
  • 0 in reply to TheITCompany

    TheITCompany said:
    Was there any further development on this issue?

    As far as I know, there's never been any development at all, in the sense of someone at Sage looking into the issue. 

    I've responded to a post on a terminal server issue where Sage 50 2017.2 on a Terminal Server would max one CPU and grind to a halt after file conversion.   The cause was Sage 50 looking for certain Crystal Reports registry keys at about a million queries per minute.  The hack fix is to add a bogus registry key to make the Sage 50 software stop looking.  A good fix might start with a nerf bat at the desk of the programmer.  Again, as I've said in other posts, I don't work for Sage and I don't have clients, but I do like solving interesting and difficult puzzles. 

    TheITCompany said:
    Having my users use small windows alleviates some of the issue

    Not sure what you mean by 'small windows'.   If you mean 'restored' versus 'maximized', yes, the invoice screens seem to run faster if they're not Maximized, even when their size is adjusted to cover the whole screen.  I can't tell you why that is without a lot of testing and hacking.  And maybe not even then.

    The invoice screens also don't make you wait to load them if they don't have to - the executable code that displays them stays in RAM, so closing the invoice screen to open another invoice is slower than using control-z to clear the window for the next entry, or than opening an Invoice or Order from a pick list, report, or search. 

    As I said in another post, some people use one window at a time, with one program maximized over it, and while it does work, it can be inefficient on multiple levels.

    TheITCompany said:
    but this seems like a core Sage programming issue when it comes to video display...

    Rather than access the data needed for an invoice screen into a temporary file or array, and THEN display it all at once, Sage 50 appears to paint the screen, then tell each component to refresh itself, which appears to cause a lot of screen updates.  There's almost certainly a better way, but Sage almost certainly won't rebuild it.

    To reiterate some items from previous posts:

     - Use 'restored' windows, not maximized.  Drag the corners to the size you need.   Train your users, they may have learned 'computers' using a single web browser with obvious multiple tabs and do not 'grok' Windows' multiple screens and taskbar.

     - Work out how to keep the window open and change the data, rather than closing it.   The screen components in any software are loaded out of the executable file on disk, configured, and assembled before they can be displayed. 

     - Use whatever diagnostic tools you have to find limiting factors - i.e. is it the disk or RAM on the data server, the terminal server, do the terminal, application client, and data server 'share' disk, RAM and CPU and just fight over it in a virtual cage match with the Windows OS as the referee?  

     - Test with the Sage 50 Sample file and with your company data. 

     - Don't be like our previous I.T. guy and waste time messing with Terminal Server colour settings, video drivers, total window size, etc.

    I hope that helps, to re-iterate I don't work for Sage so I have the opposite of a reason to make excuses. 

  • 0 in reply to niagarasys

    We have the same problem  on Remote Desk top.  At work we work from a server and my computer is about 2 seconds faster to open an invoice than a different employee.  Did anyone come up with a good solution to this?