Version19.112.19

This commit is contained in:
Antonio Cañas Vargas 2020-01-07 13:37:00 +01:00
parent 4084329463
commit 3595d1bffc
5 changed files with 12 additions and 4 deletions

View File

@ -492,7 +492,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.112.18 (2020-01-07)"
#define Log_PLATFORM_VERSION "SWAD 19.112.19 (2020-01-07)"
#define CSS_FILE "swad19.112.css"
#define JS_FILE "swad19.91.1.js"
/*
@ -502,7 +502,8 @@ ps2pdf source.ps destination.pdf
// TODO: Mapas más estrechos en móvil
// TODO: Quitar todos los EXTRA_DATA.
Version 19.112.18:Jan 07, 2020 Optimization in number of institutions in a country. (278668 lines)
Version 19.112.19:Jan 07, 2020 Optimization in number of users in a country. (278675 lines)
Version 19.112.18:Jan 07, 2020 Optimization in number of users in a country. (278668 lines)
Version 19.112.17:Jan 07, 2020 Optimization in number of institutions in a country. (278600 lines)
Version 19.112.16:Jan 07, 2020 Optimization in number of centres in an institution. (278576 lines)
Version 19.112.15:Jan 06, 2020 Optimization in number of degrees in an institution. (278567 lines)

View File

@ -1384,6 +1384,7 @@ void Cty_RemoveCountry (void)
/***** Flush cache *****/
Cty_FlushCacheCountryName ();
Ins_FlushCacheNumInssInCty ();
Usr_FlushCacheNumUsrsWhoClaimToBelongToCty ();
/***** Write message to show the change made *****/
Ale_CreateAlert (Ale_SUCCESS,NULL,

View File

@ -416,6 +416,7 @@ void Gbl_InitializeGlobals (void)
Crs_FlushCacheNumCrssInDeg ();
Usr_FlushCacheNumUsrsWhoDontClaimToBelongToAnyCty ();
Usr_FlushCacheNumUsrsWhoClaimToBelongToAnotherCty ();
Usr_FlushCacheNumUsrsWhoClaimToBelongToCty ();
Usr_FlushCacheNumUsrsWhoClaimToBelongToIns ();
Usr_FlushCacheNumUsrsWhoClaimToBelongToCtr ();
Usr_FlushCacheNumUsrsInCrssOfIns ();

View File

@ -4606,7 +4606,11 @@ unsigned Usr_GetNumUsrsWhoClaimToBelongToCty (struct Country *Cty)
if (Cty->CtyCod <= 0)
return 0;
/***** 2. Fast check: If cached... *****/
/***** 2. Fast check: If already got... *****/
if (Cty->NumUsrsWhoClaimToBelongToCty.Valid)
return Cty->NumUsrsWhoClaimToBelongToCty.NumUsrs;
/***** 3. Fast check: If cached... *****/
if (Cty->CtyCod == Gbl.Cache.NumUsrsWhoClaimToBelongToCty.CtyCod)
{
Cty->NumUsrsWhoClaimToBelongToCty.NumUsrs = Gbl.Cache.NumUsrsWhoClaimToBelongToCty.NumUsrs;
@ -4614,7 +4618,7 @@ unsigned Usr_GetNumUsrsWhoClaimToBelongToCty (struct Country *Cty)
return Cty->NumUsrsWhoClaimToBelongToCty.NumUsrs;
}
/***** 3. Slow: number of users who claim to belong to an institution
/***** 4. Slow: number of users who claim to belong to an institution
from database *****/
Gbl.Cache.NumUsrsWhoClaimToBelongToCty.CtyCod = Cty->CtyCod;
Gbl.Cache.NumUsrsWhoClaimToBelongToCty.NumUsrs =

View File

@ -426,6 +426,7 @@ void Usr_FlushCacheNumUsrsWhoDontClaimToBelongToAnyCty (void);
unsigned Usr_GetNumUsrsWhoDontClaimToBelongToAnyCty (void);
void Usr_FlushCacheNumUsrsWhoClaimToBelongToAnotherCty (void);
unsigned Usr_GetNumUsrsWhoClaimToBelongToAnotherCty (void);
void Usr_FlushCacheNumUsrsWhoClaimToBelongToCty (void);
unsigned Usr_GetNumUsrsWhoClaimToBelongToCty (struct Country *Cty);
void Usr_FlushCacheNumUsrsWhoClaimToBelongToIns (void);
unsigned Usr_GetNumUsrsWhoClaimToBelongToIns (long InsCod);