Jump to content

vbdavie

uniGUI Subscriber
  • Posts

    178
  • Joined

  • Last visited

  • Days Won

    6

vbdavie last won the day on December 16 2023

vbdavie had the most liked content!

Recent Profile Visitors

1612 profile views

vbdavie's Achievements

Active Member

Active Member (3/4)

5

Reputation

  1. yes, irigsoft said he asks a question every 15minutes. That is triggered by a uniTimer event. That means it WONT work, if the browser went dead/asleep. Right? DAvie
  2. Irigsoft; The TuniTimer REQUIRES that the BROWSER send the timer event. So if the browser is non functional (frozen/hung/asleep/hibernated) then your mainform will never get the timer event Norm; Which server setting controls this "automatically terminated after a short interval"? My hibernated sessions end up going for 24 hours. My session idle timeout is set for 24 hours. In this case, i don't seem to have a way to kill the session earlier. Davie
  3. when the client web browser is stuck/hung/frozen OR the laptop is in hibernate or sleep mode, the webbrowser does NOT send the timer events to my mainform. I need a timer event for my mainform so that i can do certain things every 10 seconds. EVEN IF the browser is not functioning. So after a certain period of time, i can kill/terminate the session. Thanks DAvie
  4. Depending on users login, i set a different TIMEOUT period. So, could be 5 minutes or 10 minutes or 30 minutes. The TuniTimer works GREAT... IF the browser is working properly. See, the TuniTime DEPENDS on the browser to send the timer events. I could the number of timer events that I get and then i know "about" how much time has elapsed and then I can TERMINATE the session. PROBLEM: Lets pretend that the browser is stuck/hanged/lockedup/frozen ORRRRRRR that the laptop went into SLEEP mode, which means the browser isn't even executing. That means my TuniTimer will NEVER send an event to the serverside code for my main form. Thus the session will never timeout. I set a big timeout on the servermodule so that I can control how long each session lasts. I set the servertimeoutsecs to 12 houts and then my TuniTimer helps me terminate sessions after a desired period of time. 5/10/30 minutes. So, if the webbrowser can't send the timer event, how can my mainform get an event on a regular basis WITHOUT relying on the client side to be working? Thanks Davie
  5. okay. 1. the user clicks a buttons and i enabled the mask 2. the screen goes gray with a mask (good) 3. I do a bunch of logic 4. I do a bunch more logic (a little time consuming maybe 3 seconds) 5. I turn off the mask and the screen returns to normal (good) If I open a form in step 3 so that the user can pick some options, then when the form closes, the screen's mask is turned off. That means while step 4 is executing (maybe 3 seconds) the mask is off and the screen looks normal and the user THINKS he can click and do things when in fact step 4 is not done yet. Thanks DAvie
  6. I have a similar problem. Instead of display a message (after my mask is enabled), i display a form for the user to pick an option. Then when the form is closed, the mask is GONE. How do i keep the mask active once the form is loaded and then closed? Thanks DAvie
  7. DBGrid just decides to scroll the FOCUSED cell into view for a grid with more rows than can be displayed at once. EVEN THOUGH i had scrolled the vertical scroll bar so that the FOCUSED row has been scrolled out of view. Go to your demo on the uniGUI.COM website then pick desktop demo then open up the "Grids" tree section of the demo then pick "Cell Editors". Doesn't really matter which example you pick. I picked cell editors because it has LOTS of rows (more than are visible). That is the key. Now, in order to replicate the problem/bug/annoyance, follow these steps... 1. CLICK/FOCUS a cell on the top row (could be any row) 2. Scroll grid so that that top row scrolls up and out of view. Scroll with mouse wheel OR the VERTICAL scroll bar. BE VERY CAREFUL NOT TO CLICK ANYWHERE ELSE ON THE FORM cause that cell you focused in step 1 will lose focus. We don't want the cell to lose FOCUS. 3. Click once on your desktop(windows) so that the browser loses focus. Don't worry if you click on an icon since you are not double-clicking. If you have many programs running at once, i suppose you could click on NOTEPAD too. Doesn't matter, we just need the browser to LOSE FOCUS. 4. Now be careful to click on the browser (but not inside the displayed web page. If you click in the red area, you will be safe. It's unused space on the title bar of most browsers. You will notice that the cell you FOCUSED on step 1 has now SCROLLED BACK INTO VIEW. NOTE: This auto scrolling occurs in a variety of other ways too. It's not just defocusing the browser and then refocusing the browser. TO me that seems bad and dumb, because I didn't tell the grid to change my vertical positioning. I hope this is an issue with unigui and not the sencha stuff. Thanks DAvie
  8. I have this mainform with tons of tabs and controls and labels etc... It was taking about 17 seconds before i saw the page start to display on the screen. It worked fine, but the users were clicking refresh because they didn't think it was loading. They were impatient. So, i added a splash screen that displays almost immediately, but still about 17 seconds until the mainform displays. I tracked it down to the uniGUIApplication.pas JSPreProcess function. It consists of removing the /* and */ comments and then it removes the #3 and #4 characters. The first task was taking about 4 seconds and the second task was taking about 13 seconds. You can see that i modified the 1st task so that it takes less than a second instead of 4 seconds. function TUniGUISession.JSPreProcess(const JSCode: string): string; var I,J : Integer; // the following variables are added by DLR PCharS:PChar; PCharD:PChar; Delta:Integer; DeltaTmp:Integer; OrigLen:Integer; ResultAddr:PChar; LastByte:PChar; begin // DLR FASTER COMMENT REMOVAL Result := JSCode; ResultAddr:=@Result[1]; OrigLen:=Length(Result); LastByte:=PChar(Integer(@ResultAddr^)+OrigLen*SizeOf(Char)); Delta:=0; I := pos('/*', Result); while I <> 0 do begin // Extracts comments J := PosEx('*/', Result, I); if J>I then Begin //DLE PCharS:=ResultAddr; Inc(PCharS,I + (J - I + 2)-1); PCharD:=ResultAddr; Inc(PCharD,I-1); DeltaTmp:=((J+1) - (I) + 1); Delta:=Delta + DeltaTmp; // the move could be a little more efficient by not MOVING all the data, but it works fast Move(PCharS^,PCharD^,Integer(@LastByte^)-Integer(@PCharS^)); End else Inc(I, 2); I := PosEx('/*', Result, I); If I>OrigLen-Delta Then I:=0; end; //DLR SetLength(Result,OrigLen-Delta); Result := HandleJSReturns(Result); Result := AnsiReplaceStr(AnsiReplaceStr(Result, CommandDelim, ''), IdentDelim, ''); // Extracts aux delimiters end; You can see i use the MOVE instead of the DELETE operation. SO much more faster. THEN the 2nd task was calling the "AnsiReplaceStr" function which is terribly SLOW and was taking about 13 seconds So, I replaced that function with a replacement i found on the internet. So, i added this code BEFORE the "AnsiReplaceStr" usage. function AnsiReplaceStr(const AText, AFromText, AToText: string): string; begin //DLR Result:= StrUtilsEx.FastStringReplace(AText, AFromText, AToText, [rfReplaceAll]); // Result:= SysUtils.StringReplace(AText, AFromText, AToText, [rfReplaceAll]); end; Function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string; Begin //DLR Result:= StrUtilsEx.FastStringReplace(S, OldPattern, NewPattern, [rfReplaceAll]); //Result:= SysUtils.StringReplace(S, OldPattern, NewPattern, [rfReplaceAll]); End; Of course you will have to include StrUtilsEx in your USES clause. You can see that my replacement functions call a different function in the StrUtilsEX.PAS module. It's much faster. Probably 15 times faster. So, now the 2nd task takes less than 1 second instead of the 13 seconds. The end result is that my splash screen is only displayed for about 4 seconds instead of 17. Great improvement. Keep in mind that this fix is EXTREMELY useful only for LARGE FORMS with tons of controls. You won't notice any difference on small forms. Now for the magic, I have attached the StrUtilsEX.PAS file for your pleasure. Have fun with faster loading forms. If UNIGUI would implement my changes or similar that would be great, OTHERWISE I/we have to update the UniGUIApplication.pas file each time we download a new version Davie StrUtilsEx.pas
  9. Thanks., thats exactly what i needed to know. 1. Hyper server can get around the 4GB limit for total sessions memory and that only 4GB limit PER SESSION is enforced and can be accomplished by using more nodes. Great. 2. ISAPI is limited to 4GB for ALL SESSIONS COMBINED because it doesn't spawn off another w3wp.exe to be able to utilize more RAM for more sessions. Okay, so when i see my user count grow to around 35-40 at the same time, then I will definietly look at the HyperServer. QUESTION: Does hyperserver run inside IIS/ISAPI? I ask because we use the MICROSOFT APPLICATION PROXY to intercept our web site so that users are forced to use MFA (authentication) and to use SSL etc... And the proxy integrates perfectly with our IIS. Thanks DAvie
  10. Hello? Anyone can answer my question above? DAvie
  11. so you are saying with HyperServer, it can run my 32bit app and have 100 sessions with each session using 100MB for a grand total of 10GB. Thus the 32bit memory limit of 4GB is gone and the 4GB limit only applies PER SESSION? Is that correct? Davie
  12. Thanks for idea. Not a solution for me though. The 80% of my 900K lines of code is DUAL use. 1. Desktop EXE program 2. Web application (ISAPI) So, when I make a call to a routine that builds an array of accounts and account valuation, that is the SAME code that works in my desktop.exe version AND the Web version. I keep as much code as possible as dual use so that I don't have to rewrite a bunch of stuff. PLUS the BONUS is that when I fix code in the desktop version, all i do is recompile the web version and POOF, it's fixed in there as well. Can someone answer my original question? I can tell you what "I" think would be cool and that would be to auto-hybernate datasets. IE: If a dataset hasn't been accessed for more than a minute, maybe just ditch the data into a temp file and free the memory. THEN when that dataset needs accessing, just load it back from the temp file and reallocate the ram and poof ... everything is operational. Thanks Davie
  13. I understand that the ISAPI module w3wp.exe (32bit) can handle 4GB of RAM. Question. I have an application that has over a million lines of code and am NOT considering conversion to 64bit model. So with that in mind, if i have 20 users logged in, there is about 2GB. It's about 100MB per user. There's a lot of data that is preloaded into ram to make it much faster. Otherwise the system is slow. So the 100MB per user is needed. Does that mean it can only handle about 40 users (4GB)??? OR DOES THE ISAPI system do clever smart things like SPAWN another w3wp.exe to allow more users(more ram). Or, am i now constrained to only about 40 users? Thanks Davie
  14. You will get a kick out of this. My server had about 500MB free. It was running at a decent speed. If the mem gets to close to zero, then it really slows down. So i didn't give it much thought. But i know that when you run past 60-90 days, the possibiliy of resource leaks becomes greater. So I decided to start closing down programs(browsers and control panel and server manager and backup-app etc...) I didn't restart it, but NOW THE UNIGUI SESSION IS BEYOND 1hour. Almost 2 hours now. My gut is that it will go for many hours as expected. Whew. But i will STILL restart the server. I know in the DESKTOP programs, sometimes theres a resource LEAK (not mem leak) and these user-objects and GDI-objects can wreak havoc when too many are allocated and sometimes you can't recover them until you reboot. I hope this helps some other people as well. I hope that it continues to work AFTER i restart 🤣 Sorry about your time. Davie
  15. Truely bizarre. My OLD DLL (version 1551 from early 2021) now does the same thing. <crash after one hour with NO events triggered... the session simply vaporizes> What should I check next? In the meantime, I am going to RESTART the server. It's been up for 149 days. I've noticed "some" various issues when servers are up longer than a month. Any other ideas? Thanks DAvie
×
×
  • Create New...