Commit Graph

306 Commits

Author SHA1 Message Date
Michael Snoyman
bd05541df4 Limit request body sizes for chunked bodies 2013-01-01 11:18:07 +02:00
Michael Snoyman
bf293e6a1f Make new session code optional, keep old API 2012-12-26 19:00:45 +02:00
Michael Snoyman
f4674f9465 Merge branch 'faster-session' of https://github.com/meteficha/yesod 2012-12-26 18:19:22 +02:00
Michael Snoyman
9624d4bf66 Add error logging for all internal server errors (#335) 2012-12-26 16:41:24 +02:00
Michael Snoyman
054340ec10 Version bumps 2012-11-28 09:47:01 +02:00
Michael Snoyman
0c4ded0fd1 Slightly more efficient header construction 2012-11-25 21:45:08 +02:00
David L. L. Thomas
513d6ed4f9 Bugfix - Caching redirect *only* for 301 redirects
Previous commit got it backwards.
2012-11-25 11:12:39 -08:00
David L. L. Thomas
246a024dce Allowing cache on 301 redirects 2012-11-23 13:44:31 -08:00
David L. L. Thomas
a2ad8fe704 Prevent caching of redirect
Dynamic redirects shouldn't be cached.  This especially causes a problem
with redirection to the login page, since trying to actually access the
page the user logged in to see can get them redirected back to the login
page on some browsers.

This patch adds headers to prevent caching of all redirects, which isn't
ideal, but better than allowing caching of all of them.
2012-11-21 22:39:53 -08:00
Michael Snoyman
d37b0634a5 Added yesodMiddleware method 2012-11-21 10:58:45 +02:00
Michael Snoyman
053210da6f shakespeare-js 1.0.2 and 1.1 2012-11-16 09:27:31 +02:00
Michael Snoyman
e43bc22c39 Version bumps 2012-11-13 09:52:21 +02:00
Michael Snoyman
a598846bd3 Better formatting of error messages 2012-11-12 11:24:32 +02:00
Michael Snoyman
21090b9314 Version bumps 2012-11-11 10:08:37 +02:00
Michael Snoyman
d40da67656 Remove hspec upper bound 2012-11-09 09:12:32 +02:00
Michael Snoyman
ae8168ede5 Added extra explanation from Felipe 2012-11-07 14:49:11 +02:00
Michael Snoyman
a144b56928 Warning about fork vs resourceForkIO 2012-11-07 14:35:31 +02:00
Michael Snoyman
ed5e65ae95 Merge branch 'master' of https://github.com/piyush-kurur/yesod 2012-11-07 14:05:18 +02:00
Piyush P Kurur
e32f37eadd refactored mkYesodGeneral to use mkDispatchInstance 2012-11-07 16:51:25 +05:30
Michael Snoyman
1c7e4c6f1a Version bumps 2012-11-07 12:07:32 +02:00
Piyush P Kurur
30ddc17384 yesod-core: generic dispatch instance generation fixes #427 partially. 2012-10-26 15:23:54 +05:30
Simon Hengel
dfae661878 Adept Hspec tests for forward compatibility
* Don't use hspecX, it's deprecated.

 * Do not import Test.Hspec.HUnit.  It's no longer necessary and may be
   removed in the future.
2012-10-16 14:44:58 +02:00
Michael Snoyman
4a6bdc0db7 Version bumps 2012-10-15 08:58:01 +02:00
Michael Snoyman
ae23dee4ab Include level in source 2012-10-13 22:40:03 +02:00
Michael Snoyman
01b855969b CssBuilder 2012-10-11 07:35:25 +02:00
Michael Snoyman
57b8748a3d lifted-base 0.2 2012-10-11 06:41:14 +02:00
Michael Snoyman
45e54ff2bb vector 0.10 2012-10-04 16:44:13 +02:00
Michael Snoyman
e28f330711 path-pieces dependency bump 2012-09-29 22:29:17 +02:00
Michael Snoyman
a30cc74087 Export log*S (#405) 2012-09-23 13:44:04 +02:00
Michael Snoyman
34f2942c54 Add deprecation for messageLogger (#405) 2012-09-21 17:15:21 +03:00
Michael Snoyman
7bd06e9b7b LogSource (#405) 2012-09-21 15:01:07 +03:00
Michael Snoyman
cf4fed8cb9 Precede null path segments with dashes (#421) 2012-09-21 14:23:38 +03:00
Michael Snoyman
a6ce05609d Version bumps 2012-09-11 07:17:23 +03:00
Felipe Lessa
b2a9beba3c Use a cache for session cookie's expiration time.
The following HelloWorld app was used as benchmark:

  data HelloWorld = HelloWorld
  mkYesod "HelloWorld" [parseRoutes|
    / HomeR GET
  |]

  instance Yesod HelloWorld where
    -- makeSessionBackend = const $ return Nothing

  getHomeR = return . RepPlain . toContent $ "Hello World!"

  main :: IO ()
  main = warp 8080 HelloWorld

The benchmark was tested with httperf under the following
environments:

  [vanilla-nosession] Released yesod-core 1.1.1.1, but without sessions.

  [vanilla-session] Released yesod-core 1.1.1.1 (with sessions).

  [faster-session-1] With patch 065e33a, "Faster, leaner
  implementation of putTime/getTime".

  [faster-session-2] With this commit.

Performance results:

  A) Testing with:
       httperf --hog --client=0/1 --server=localhost \
               --port=8080 --uri=/ --rate=1000 \
               --send-buffer=4096 --recv-buffer=16384 \
               --num-conns=100 --wsess=1000,60,1 \
               --burst-length=20 --session-cookie

     Results:
       vanilla-nosession: 19187.7 req/s (0.1 ms/req)
       vanilla-session:    2523.3 req/s (0.4 ms/req)
       faster-session-1:   2933.5 req/s (0.3 ms/req)
       faster-session-2:   2957.5 req/s (0.3 ms/req)

     This test benchmarks both saving and loading the session.
     Interestingly, this commit provides only a small performance
     increase.

  B) Testing with:
       httperf --hog --client=0/1 --server=localhost \
               --port=8080 --uri=/ --rate=1000 \
               --send-buffer=4096 --recv-buffer=16384 \
               --num-conns=100 --num-calls=1000 \
               --burst-length=20

     Results:
       vanilla-nosession: 43548.7 req/s (0.0 ms/req)
       vanilla-session:    3609.4 req/s (0.3 ms/req)
       faster-session-1:   3454.9 req/s (0.3 ms/req)
       faster-session-2:   3786.9 req/s (0.3 ms/req)

     This test benchmarks only saving the session.  Strangely,
     faster-session-1 was worse than vanilla-session (while
     isolated tests show that the new putTime should be +70x
     faster).  However, there is a non-negligible performance
     increase on faster-session-2.
2012-09-05 01:35:10 -03:00
Felipe Lessa
065e33a3d1 Faster, leaner implementation of putTime/getTime.
Benchmark on my computer (per call, includes runPut/runGet):

    old putTime: 5658 ns +/- 224ns
    new putTime:  821 ns +/-  24ns (7x faster)

    old getTime: 7228 ns +/- 126ns
    new getTime:   99 ns +/-   4ns (73x faster!!)

Besides, the old format used 25 raw bytes (33.3 bytes on the
base64 output), while the new one uses 8 bytes (10.6 bytes on the
base64 output).
2012-09-05 00:41:54 -03:00
Felipe Lessa
865281d241 yesod-core: Bump version to 1.1.1.1.
Where do I redeem my prize?
2012-08-27 14:50:11 -03:00
Felipe Lessa
0d95e6917d yesod-core: Whitespace. 2012-08-27 14:50:04 -03:00
Felipe Lessa
5b19865c7a yesod-core: In handlerToIO, really avoid keeping old handler data in memory. 2012-08-27 10:20:17 -03:00
Felipe Lessa
20f51e38e2 yesod-core: Doc improvements for runFakeHandler. 2012-08-21 13:38:49 -03:00
Felipe Lessa
0346dab14c yesod-core: New function runFakeHandler. 2012-08-21 13:38:42 -03:00
Felipe Lessa
dc14783c81 yesod-core: On handlerToIO, avoid 'sourceList []'. 2012-08-20 13:13:46 -03:00
Felipe Lessa
786b5bc6e2 yesod-core: On handlerToIO's docs, avoid shadowing a name. 2012-08-20 13:09:43 -03:00
Felipe Lessa
60046bad96 yesod-core: New handlerToIO function. 2012-08-20 13:07:58 -03:00
Michael Snoyman
2e87e13347 Filter missing files (#403) 2012-08-12 17:36:26 +03:00
Michael Snoyman
df5018a94c hspec 1.3 2012-08-03 15:40:36 +03:00
Michael Snoyman
da33be529d Deprecated addWidget 2012-08-03 07:38:21 +03:00
Michael Snoyman
b0c6651ac6 Strictness annotations on Content 2012-07-25 08:56:46 +03:00
Michael Snoyman
c009067b11 DontFullyEvaluate (Felipe's code) 2012-07-25 08:54:43 +03:00
Michael Snoyman
f91ff4fde2 fullyEvaluateBody 2012-07-24 17:49:17 +03:00
Michael Snoyman
33c39662b9 Reflect wai changes for #262 2012-07-11 15:58:36 +03:00