News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Slow redraw bug

Started by Dr PR, December 02, 2009, 11:40:37 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr PR

DesignCAD V19.1 Vista 64 SP1, XP Pro Sp3 (actually all versions of DesignCAD)

A major shortcoming of all versions of DesignCAD is excruciatingly slow screen redraw after a layer is disabled while the drawing is rendered with shading (Gouraud) enabled. I was working on a 22 Mbyte design of a four part plastic case. The drawing was converted from a stereolith model with AccuTrans to DXF format and then imported into DesignCAD. The four solids have a very large number of facets - more than 62,000 planes.

I made the mistake of disabling the layer containing one of the solids while in shaded view. I could see the individual facets being removed from the image, one by one. After ten minutes the redraw was less than half finished. Of course the status bar said "To stop redraw: Press ESC" but as far back as I can remember this has never worked so I used the normal DesignCAD procedure for stopping lengthy redraws:

CTRL-ALT-DEL

and terminated the program in Task Manager.

The same thing happens sometimes if you delete a large object while the drawing is shaded.

I have observed this problem for years and I think I know what the problems are.

1. When you press the ESCape key all that happens is the redraw of the current facet is terminated. The program then goes on to redraw the next. When there are tens or hundreds of thousands of planes redraw can take hours. If you hold down the ESCape key you can see the program stopping and restarting over and over.

This is a bug! When you press ESCape all redrawing should stop.

2. The real problem is that the program is redrawing the entire image - in all four windows - after each individual facet is deleted. Tens of thousands of redraws takes a long time!

This is a bug! It would be MUCH faster to just disable the layer or delete the object and then redraw the entire drawing.
DesignCAD user since 1987

Dempsey

Dr PR,

With my relative slow machine I have the same problem when I disable a layer from the layer pull-down menu. Reported as problem 45.

The solution is to disable the layer using the Layer Options menu.
Dempsey

Dr PR

Dempsey,

The slow redraw problem I am talking about happens when you disable a layer from the Layers Dialog. I have rarely used the Layers pull-down list.

I have just tested it in V20.0b8 on a fairly large drawing with Gouraud shading and hardware acceleration enabled. In this case the layers turn on and off very quickly. We have noticed some significantly faster redraw timing in V20 (some things aren't much faster, but at least they aren't slower).

It seems to me that this was an unpredictable problem, only appearing in some drawings. I will watch for it.
DesignCAD user since 1987

dbaker06

This issue was happening in V22 and it is still happening in V23. I do not have Intellipoint installed. This is a known bug that needs someones attention at DesignCad. The larger the drawing file the more often the screen will try to redraw and then the screen go blank requiring a regen to get the drawing back. This takes quite a bit of time.

Dr PR

#4
db,

This is such an extreme problem that I have instinctively developed habits to avoid it.

1. I never delete objects from a shaded drawing. I always switch to wireframe first.

2. I never disable layers while the display is shaded. I always switch to wireframe first.

Failure to follow these rules in a very large drawing may result in 30-45 MINUTE screen redraws - even on a very fast machine!

CTRL-ALT-DEL

The DesignCAD video routines are being rewritten. Maybe this problem will soon be fixed.

Phil
DesignCAD user since 1987

SEJ

I realize this is an old conversation, but the problem still exists today, and believe I've found solution(s) to the problem.   I apologize for my long winded note, but I felt the detail was important.

I've been involved in a design project for the last few months that has allowed me to spend 4-8 hours a day working with DesignCAD.  The frustration of the redraw problem over the years has caused me to develop many of the same workarounds that DR PR mentions in his post.  But even with drawings of less than 1Meg I could get redraws that took over 5 minutes, if it ever finished at all. I also like my 4 window configuration for DesignCAD 3D drawings so I finally decided to spend the time researching the problem and looking for solutions on the hardware and software sides.  I had DesignCAD 3D Max 21 running on the same drive as DesignCAD 3D Max 25 (64Bit). I haven't noticed any difference to speak of between the versions when it came to this problem. 

My research indicated that the problem wasn't so much the graphic card and its power as it was the computer itself, especially the hard drive and configuration.  The desktop system I used until recent changes included:
   AMD Phenom II X4 945 Processor running at 3.00 GHz
   12.0 GB Installed memory (RAM)
   64-Bit OS running Windows 7 Professional (Service Pack 1)
   Main Drive was a WD-10EARS, SATA, 7200 RPM (1 TB) drive
   Video Driver is an AMD Radeon HD 5700 Series w 4GB onboard
   Logitech wireless Gaming Mouse (G700S) and Software (12 programmable buttons!)
   Samsung 32" LCD as my main monitor 1920 x 1080, running an extended screen with
   An old MAG 17" monitor 1280 x 1024 alongside.
   A CyberPower 1500 PFCLCD, UPS to protect all of this from power failures.

My first successful improvement was to install a Samsung 850 EVO 500GB 2.5-Inch SATA III Internal SSD, even though my machine is limited to SATA-II (Amazon $150).  Before I installed it, Windows Experience Index for my machine was 5.4, due mainly to the hard drive.  After installing and tweaking the SSD that number went up to 7.3.  What this meant, in real world terms was that the computer started up in ½ the time, DesignCAD started and loaded in less than ½ the time, and the redraws were taking about 50%  less time, but still stalled on occasion and provided the same frustration when trying to drag or rotate an object. So... back to "Googling". I found some references in this forum of using RAM-Disk, and despite having an SSD, research online said RamDisk was even faster.  I loaded a trial version of "RamDisk Plus" that also allows the RamDisk to be saved when the computer is shut down. Having the UPS is another safety factor for configuring this way.

After setting up a 2GB RamDisk, uninstalling DesignCAD 3D Max 21 and reinstalling it on the RamDisk, copying all of my work files over (doing some reorganization while I was at it), I was able to see a REAL difference in performance.  There was one Registry edit I found necessary since DesignCAD didn't want to listen to me when it installs, so it installs on the drive I select but then made a registry entry that mean Windows won't let me use it as a default program to open files.

Since setting up in this manner my longest redraw has been less than 10 seconds!!!  The normal redrawn on my 1.3Mb drawing is now between 1 and 2 seconds, and the drag and rotate are now real time, not the "move and wait" that was required before the change. In the last 5 days of work, I've not had a single hang that required a "3 finger Wave" (Ctrl-Alt-Del).  Once in awhile I get the graphic display problem where DC gives me white windows, but as in the past that only requires a redraw command (in my case a mouse button for Ctrl-Shift-R, or Ctrl-Shift-W).

There may be cheaper RAM-Disk programs out there, but I've decided that this one had the features I want and is working without problems, so I'll have to pop for the $80.

I hope that all this helps someone else save some time, it definitely is saving me time and frustration (more than $230's worth). Anyone that wants to discuss more detail can PM me, I'll be happy to reply.
If Murphy hasn't bothered you, then you're not doing anything.

Dr PR

SEJ,

Many thanks for this information!

First, if the program was saving active drawing information and program variables in system RAM you would see no improvement with a RAM drive except for file save/read operations to/from disk storage.

The speed improvement you see using a RamDrive indicates that DesignCAD is saving and reading the working copy of the drawing on a hard drive instead of in system RAM. Given the extremely limited (about 1 Gbyte max) address space of the 32 bit versions this is understandable.

But hard drives are very slow - even the fastest drives. Head repositioning (track stepping) takes milliseconds and rotation latency (waiting for the right data to spin under the head) also takes milliseconds. And data transfer through the cables to the computer is also relatively slow, even with SATA 3. RAM addressing is measured in nanoseconds - a million times faster!

This points to a relatively simple fix (simple for me to say, but maybe not for DT and company to implement). The 64 bit versions can potentially address about as much memory as exists in the entire known universe, so address space isn't a problem. So if the program was modified to use RAM instead of the hard drive for working storage all users would see the tremendous speed increases without having to install a RAM drive.

I doubt that there is a CAD computer running today that has less than four gigabytes RAM, and any serious CAD platform will have 8 to 32 gigabytes of RAM. Even my laptop has 12 Gbytes!

I am working on a huge project that has multiple 250+ Mbyte files, but the total of all the files is only about a gigabyte. My computer has 32 Gbytes of RAM, and only a fraction of a gigabyte is being used. With a 75 Mbyte file open only 445 Mbytes of RAM are being used by DesignCAD. I have worked with 250 Mbyte files with the 32 bit version (about the maximum file size) and 750 Mbyte files with the 64 bit version, but only a small part of the 32 Gbytes of RAM on the machine are used. So RAM should not be a limiting factor.

****

This can explain something that has been puzzling me. The RedSDK turbine demo generates ray-traced shadows, reflections and dynamic shadow reflections at up to 250 frames per second on my 2.3 GHz i7 Win 7 Pro 64 machine. It is amazing!

And in DesignCAD with RedSDK enabled, the simple quick shaded RedSDK display is far, far, far, far faster than the RedSDK disabled OpenGL quick shaded display. With RedSDK the image of a 50 Mbyte drawing rotates smoothly. With RedSDK disabled it takes several seconds to generate each new image on the screen as the view rotates. This can be explained easily if RedSDK is working out of RAM (which it obviously is) and the old DesignCAD routines are working off the hard drive.

I wonder if DT can comment on the RAM vs hard drive working storage idea?

****

Second, I am very leery of solid state drives. All of these I know of use Flash memory technology, and Flash memory cells have a limited number of write cycles before they become unreliable (from 100,000 to 1,000,000 write cycles). Flash memory chips have controllers that remap internal addresses to spread the usage evenly over the entire array so no one location gets used more than others, but that just means the entire device wears out evenly.

For things like USB memory sticks Flash is ideal. These don't get written to all that often so they last a long time. I am still using my first USB memory stick (256 Mbyte) that I got more than 20 years ago.

But solid state drives can be rewritten millions of times a second if they are used for operating system and program variable storage (as DesignCAD seems to be doing). This will burn them up pretty fast. So you really need to back up data to a hard drive and be prepared to replace the solid state drive much more frequently than a hard drive.

Having said this, I have considered using a solid state drive because of the enhanced program speed.

Phil
DesignCAD user since 1987

SEJ

Phil,

Thanks for the reply and information.

I'm leery of the SSD's ability long term, but in the recent past my WD and Seagate drives haven't proven to be all that reliable or long lived either.  Personally I think that windows has something to do with that because of the constant defragging operations. So as in the case of my old drives I keep an image copy of the SSD on a backup drive.  I might lose one day's work, but that's about it. The RAM-Disk drive is saving to I don't know where yet, but obviously it's working because whenever I fire the computer up in the morning, everything is there. I did move all of our pictures off of the "C" drive just to bring the size down to a manageable level when I converted over.

All this memory size is quite amazing to me.  In 1967 I was in the Air Force and worked as a Cryptographic Equipment Systems Repairman in a communication center in Korat Thailand. That center had one of the Air Forces "New" computer system operating as a "Switch" to transmit and receive data.  It was in an air conditioned building with around 8,000 square feet to hold the "Modern" transistorized computer. The computer had a whopping 64K being generated by transistor Flip-Flops, one on each PCB about 4" x 6".  My first Commodore 64 had the same size memory and could do a whole lot more because it was text based on a screen, not nixie tubes and switches.  Programming was done with a paper tape reader or with binary switch inputs from a control console, we hadn't got to punch cards yet.

I have noticed that DesignCAD wasn't "using" that much memory during the redraws etc, and I get the feeling that having a quad core processor doesn't mean much to it either.  It had the ability to peg my CPU usage to over 80%. While it starts out with only about 52Meg of memory (Private Working Set), after an hour or so I've seen over 270Meg watching my Windows Task Manager with a drawing less than 1 Meg. Every copy operation adds to the total, needless to say I've got no idea what's going on, just an observer.  With the RAM-Disk in place, the memory use is always at least 5 Gig, if I remember correctly it used to stay down around 2 or 3 Gig.

I'm amazed that you work with drawings so big. I never would have allowed myself to get a DesignCAD drawing over 5Meg, knowing how slow it got with 20% of that.  With the new configuration, I'm leaving Graphics Acceleration on, and keep the Main window (Isometric View) all pretty with the Gouraud shading.  I love it when the screen blinks and it's done a complete redraw cycle.  In the current drawing I've got many referenced symbols that used to help choke the system.

I tried the RedSDK Flat file download, but it took minutes to render.  I'll have to go back and see how it works with the RAM-Disk.  I've never allowed the RedSDK option on DesignCAD but I'll have to test it out sometime in the near future. Well gotta go, wife just informed me it's my night to cook dinner (let me see, KFC or McD!!).
If Murphy hasn't bothered you, then you're not doing anything.

Dr PR

SEJ,

I understand your RAM "future shock." My first exposure to a computer was an old IBM 16xx tube type with a drum memory the size of a small garbage can that held 8 kilobytes.

My first computer was a home built Z80 (4 MHz!) with 64 Kbytes of RAM. Then in 1980 I designed a dual processor 12 MHz (if we could get the parts) Z80 system with 64 bit floating point math coprocessor and a memory management unit that allowed it to address a whopping 250 Kbytes! The 256 Kbytes of dynamic RAM for that memory card cost $1000 in 1980 dollars ($2800 in 2015 dollars). That first 250 Mbyte Flash memory (1993?) was 1000 times as much memory - a million dollars worth in 1980 memory costs - that I carried around in my pocket. And it was static!

When I built my XP machine in about 2000 I put in a whole gigabyte of RAM, even though I never thought I could use that much. It just sounded cool!

Now I have 32 gigabytes in my Win 7 machine and have never come close to using it all.

But I do hope DT and company keep working on DesignCAD so I can make ridiculously huge drawings if I want to.

Phil
DesignCAD user since 1987

Dr PR

I just noticed that if you use "Window/DesignCAD Tile" while the screen is shaded with OpenGL/Gouraud the four windows each redraw only once in wireframe (assuming you haven't changed the "DesignCAD Tile" settings to something other than Wireframe).

This causes you to lose your current drawing view orientation, but it doesn't take several minutes to redraw all of the windows a total of 13 times.

Phil
DesignCAD user since 1987

Dr PR

SEJ,

I just discussed RAMDISK with two high zoot programmer friends (the guys who do a lot of the Linux support, multiprocessor software development, and Internet software development).

1. One fellow's company has many multi-Terrabyte FLASH ram arrays in the equipment for their Internet Service Provider business. FLASH reliability is no longer an issue.

2. The most probable reason your RAMDISK runs faster, even though it is using the same memory that the program runs in, is that DesignCAD and Windows are paging a lot of DLLs off of the disk drive. So when either program needs to load a new DLL things come to a halt waiting for the hard drive to seek to the track and wait for rotation to bring the proper sectors under the head.

If everything is stored in the RAMDISK the paging times are thousands of times faster. With a solid state drive there is also a performance boost for the same reason, but the RAMDISK should be faster.

However, one fellow has a very large solid state drive and his system is still paging DLLs from the hard drive - but I am pretty sure he is using some version of Linux.

3. I really have no idea if DesignCAD stores any temporary drawing information on a hard drive, but given the memory limitations of the 32 bit versions (from which the 64 bit versions were developed) I wouldn't be surprised if it is doing some paging for drawing information.

In any case, given the huge amounts of RAM available in even the simplest machine these days, it would make a significant performance boost if any unnecessary hard drive read/write were eliminated.

Phil
DesignCAD user since 1987