Ignore:
Timestamp:
Nov 16, 2018, 10:38:46 PM (6 years ago)
Author:
alloc
Message:

*Latest optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs

    r326 r332  
    44using System.Reflection;
    55using AllocsFixes.NetConnections.Servers.Web.API;
     6using UnityEngine.Profiling;
    67
    78namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
     
    4041                }
    4142
     43#if ENABLE_PROFILER
     44                private static readonly CustomSampler apiHandlerSampler = CustomSampler.Create ("API_Handler");
     45#endif
     46
    4247                public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
    4348                        int permissionLevel) {
     
    5560                        if (apis.TryGetValue (apiName, out api)) {
    5661                                try {
     62#if ENABLE_PROFILER
     63                                        apiHandlerSampler.Begin ();
     64#endif
    5765                                        api.HandleRequest (req, resp, user, permissionLevel);
     66#if ENABLE_PROFILER
     67                                        apiHandlerSampler.End ();
     68#endif
    5869                                        return;
    5970                                } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.