Datasnap 服务端 (Server)Session 管理 --- 解决 全示例慢(Google)

本文介绍如何在uniGUI中使用Datasnap服务端Session管理功能获取当前线程的会话信息,包括如何通过Session获取用户名。此外,还讨论了uniGUI中不同demo的启动速度问题及解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Datasnap 服务端 (Server)Session  管理:  http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Server_Side_Session_Management

获取当前线程的会话(Session)——Getting the Current Thread's Session

    From a server method, for example, you can obtain the current thread's session. This may provide you with useful information relating to the user issuing the current request. To do so, use the following code:

Session := TDSSessionManager.GetThreadSession;   

通过 Session  可以获取 发出请求的 UserName 。

 

uniGUI很优秀,开发web速度超快!

    uniGUI中的demo AllFeaturesDemo在有网的情况下开始启动速度好慢,要等几分钟,断网情况下速度好快。而另一个简单的MegaDemo在有网的情况下打开速度很快,通过监控web发现是模块中有的调用了google。

UniServerModule.customfiles的删除
http://maps.googleapis.com/maps/api/js?sensor=false 

不调用以下模块
 MiscellaneousGoogleMaps in 'MiscellaneousGoogleMaps.pas' {UniMiscellaneousGoogleMaps: TUniFrame},启动速度就快了

http://bbs.2ccc.com/topic.asp?topicid=527694

转载于:https://www.cnblogs.com/hopesun/p/8735266.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值