Hello Mr. Rao, and others
I'm a heavely user of Xbrowse and I see myself giving Xbrowse a more fancy look, using bitmap and showing images etc. Also cell coloring based on conditions I like to do.
But will all this fancy stuff slow Xbrowse down in manipulating larger data ? lets say thousands of records and many fields ?
Witch settings will slow xbrowse down ?
The more fancy Xbrowses the more slow they become ?
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
The more fancy Xbrowses the more slow they become ?
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
Re: The more fancy Xbrowses the more slow they become ?
hi Marc,
"slowest" are GDI32 which are not Hardware Accelerated
big IMAGE need "more" Time to "paint" than small IMAGE
10 ROW in Browse / GRID is faster than 20 ROW
---
to use a "external" Graphic Card is much quicker that "build-in" Graphic also for "Desktop" (WMI Graphic Score, not Gaming Graphic)
every Graphic "Output" will slow down a little ...Marc Venken wrote:Witch settings will slow xbrowse down ?
"slowest" are GDI32 which are not Hardware Accelerated
big IMAGE need "more" Time to "paint" than small IMAGE
10 ROW in Browse / GRID is faster than 20 ROW
---
to use a "external" Graphic Card is much quicker that "build-in" Graphic also for "Desktop" (WMI Graphic Score, not Gaming Graphic)
greeting,
Jimmy
Jimmy
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: The more fancy Xbrowses the more slow they become ?
Interesting .... I knew that ram and ssd are important, but for business database app. and the graphics card, that is new for me. And indeed, It is for Xbrowse and nice graphics insite xbrowse like told before.Jimmy wrote: to use a "external" Graphic Card is much quicker that "build-in" Graphic also for "Desktop" (WMI Graphic Score, not Gaming Graphic)
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
Re: The more fancy Xbrowses the more slow they become ?
hi Marc,
as i know DMW use DirectX and also "Visual Effect" us it
old GDI32 is "slow" but GDI+ also can use Hardware Acceleration
for "internal" Graphic, using "share RAM", you can try to use XMP RAM Modus (or use Overclock Modus)
instead of 2400Mhz i can use 3600Mhz in XMP Modus (Intel) for my DDR4 RAM so internal Graphic is also "faster"
but in my Work-PC, which is only 12x12x5cm, there is no Space for a "external" Graphic Card ...
---
how do i "test" Graphic Speed of App :
i do have CLICK as "Formatter" which "can" show CODE while CLICK is working.
so i can use same Source with CLICK and different Graphic Chip / RAM Timing (share RAM)
p.s. without "Output" is CLICK 8 x "faster"
as i know DMW use DirectX and also "Visual Effect" us it
old GDI32 is "slow" but GDI+ also can use Hardware Acceleration
for "internal" Graphic, using "share RAM", you can try to use XMP RAM Modus (or use Overclock Modus)
instead of 2400Mhz i can use 3600Mhz in XMP Modus (Intel) for my DDR4 RAM so internal Graphic is also "faster"
but in my Work-PC, which is only 12x12x5cm, there is no Space for a "external" Graphic Card ...
---
how do i "test" Graphic Speed of App :
i do have CLICK as "Formatter" which "can" show CODE while CLICK is working.
so i can use same Source with CLICK and different Graphic Chip / RAM Timing (share RAM)
p.s. without "Output" is CLICK 8 x "faster"
greeting,
Jimmy
Jimmy
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The more fancy Xbrowses the more slow they become ?
XBrowse and XImage use GDI+ by default, unless the programmer switches it off, by setting oBrw:lGDIP := .f.old GDI32 is "slow" but GDI+ also can use Hardware Acceleration
I can not comment on hardware acceleration.
In addition to what Mr, Jimmy said, other factors affecting XBrowse speed:
Data access speeds is one main reason.
If the total number of cells ( rows x columns ) visible are high, full refresh is slow, because XBrowse paints each cell, evaluating all the code-blocks for each cell.
Obviously too many graphics, embellishments and conditional colors, gradients slow down further.
You need to strike a balance between looks and speed in each case.
No user likes a sluggish performance.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: The more fancy Xbrowses the more slow they become ?
Marc,
Collecting the data for one screen display depends mostly how you are getting the data. If you are using a filter, it will be agonizingly slow (as filters always are). If you are using an indexed scope it will be very fast. Some time ago I did some tests regarding this using a large database and it took 0.32 seconds to collect 20,543 records out of a one million record database across a LAN!
So, the display of one screenful of data is the bottleneck. So as Nages said, you may have to compromise some on the fancy display stuff to get an acceptable speed.
James
Note that the size of the database usually has little to do with the speed of the display of one screenful of data. The "fancy stuff" does as it must be manipulated for each screen refresh as Nages mentioned.But will all this fancy stuff slow Xbrowse down in manipulating larger data ? lets say thousands of records and many fields
Collecting the data for one screen display depends mostly how you are getting the data. If you are using a filter, it will be agonizingly slow (as filters always are). If you are using an indexed scope it will be very fast. Some time ago I did some tests regarding this using a large database and it took 0.32 seconds to collect 20,543 records out of a one million record database across a LAN!
So, the display of one screenful of data is the bottleneck. So as Nages said, you may have to compromise some on the fancy display stuff to get an acceptable speed.
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: The more fancy Xbrowses the more slow they become ?
Thanks.
I will make a nice Xbrowse, but try to temper the fancy, fancy looks )))
I do have to see when I should use the
oBrw:refresh
or
oBrw:drawline
this will make a difference in repainting.
I will make a nice Xbrowse, but try to temper the fancy, fancy looks )))
I do have to see when I should use the
oBrw:refresh
or
oBrw:drawline
this will make a difference in repainting.
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The more fancy Xbrowses the more slow they become ?
No.or
oBrw:drawline
Instead, use RefreshCurrent()
But mostly, I suggest leaving it to XBrowse, whether to Refresh() or RefreshCurrent()
XBrowse knows it better.
Let us not interfere.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: The more fancy Xbrowses the more slow they become ?
Now I wonder ..... I think I do some refresh to much then ?nageswaragunupudi wrote:But mostly, I suggest leaving it to XBrowse, whether to Refresh() or RefreshCurrent()
XBrowse knows it better.
Let us not interfere.
Are these refresh OK ?
:bChange := { || nSecs := SECONDS(), Scope("factinfo","document","factart","factart"),oBrw[6]:refresh() }
:bChange := { || scopetimer(oBrw),('foto')->(DBGOTOP()),oBrw2:Refresh(),oBrw4:gotop(),oBrw4:Refresh(),oImage:Refresh(),oImage2:Refresh(),Obrw:refresh(),Oget:refresh(),oGet2:refresh() }
oFld:bAction := { || (FolderActions("KLANTEN",oFld),oBrw[1]:gotop(),oBrw[1]:refresh()) }
DEFINE BUTTON OF oBar PROMPT "Edit" RESOURCE "edit" ;
ACTION (oBrw:EditSource(),oBrw:refresh(),oBrw:setfocus() )
DEFINE BUTTON OF oBar PROMPT "Filters Uit" RESOURCE "EDIT";
ACTION (oBrw:lGetBar:= .F.,oBrw:refresh(),oBrw:setfocus() )
@ 05,200 BTNBMP oBtn PROMPT "Delete" RESOURCE "DEL" SIZE 60,60 PIXEL OF oBrw NOBORDER ;
ACTION ( (oBrw:cAlias)->(Brwdelselect(oBrw)),oBrw:refresh() ) TOOLTIP "Delete geselecteerde records"
I also do this and I think it is also not the best way ...
Insite browse I manipulate data with the schift/select and then process
Code: Select all | Expand
case cData = "WEBSHOP_GROEPEN" .and. cButton = "2_2" // lookup data in second dbf and change it in xbrowse (dbf)
if msgyesno("De SHIFT-geselecteerde vervangen met de originele superteksten")
netopen("nofoto","BRANDID","nofotoTemp")
if webshop->(flock())
FOR I = 1 TO LEN(oBRWT2:aSELECTED) // obrw:aSELECTED is an array containing recnos marked
webshop->(dbgoto(oBRWT2:aSELECTED[I]))
cZoek = webshop->brandid
if nofototemp->(dbseek(cZoek))
if !empty(nofototemp->memotxt)
webshop->memotxt = nofototemp->memotxt
web_changes("MEMOTXT")
endif
endif
next
webshop->(dbunlock())
endif
close nofototemp
endif
case cData = "NOFOTO" .and. cButton = "NOFOTO_1_2"
if msgyesno("Markeren als NIET geselecteerd")
if nofoto->(flock())
FOR I = 1 TO LEN(oBRWT2:aSELECTED) // obrw:aSELECTED is an array containing recnos marked
nofoto->(dbgoto(oBRWT2:aSELECTED[I]))
replace nofoto->selected with .F.
next
nofoto->(dbunlock())
endif
endif
// this is a better version of Xbrowse use I think. Changes are in Xbrowse itself like You advice ?
case cData = "ARTIKEL" .and. cButton = "3_1"
// This will change all selected data from that column with a value given in cZoek
Xbrowser oBrwT2:cHeaders TITLE "Select het te wijzigen veld" SETUP (oBrw:cHeaders := {"Veldnaam"}) SELECT nVeldID:= oBrw:Veldnaam:Value
EDITVARS cZoek PROMPTS "Geef de waarde die we zullen gebruiken (NUL = 0) "
do case
case empty(cZoek)
RETURN
case cZoek = "NUL" // I need a really ZERO value here
mem_var = 0
case oBrwT2:aCols[oBrwT2:nColSel]:cDataType == 'N'
mem_var = val(cZoek)
case oBrwT2:aCols[oBrwT2:nColSel]:cDataType == 'L'
mem_var = .t.
case oBrwT2:aCols[oBrwT2:nColSel]:cDataType == 'D'
mem_var = ctod(cZoek)
otherwise
mem_var = cZoek
endcase
if msgYesNo("Wijzigen doorvoeren")
FOR I = 1 TO LEN(oBRWT2:aSELECTED) // obrw:aSELECTED is an array containing recnos marked
(oBrwT2:cAlias)->(dbgoto(oBRWT2:aSELECTED[I]))
oBrwT2:&nVeldID:Varput( mem_var )
NEXT
endif
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour